Package org.htmlunit.protocol.javascript
Class JavaScriptURLConnection
java.lang.Object
java.net.URLConnection
org.htmlunit.protocol.javascript.JavaScriptURLConnection
A URLConnection for supporting JavaScript URLs.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
The JavaScript code.static final String
The JavaScript "URL" prefix.Fields inherited from class java.net.URLConnection
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
connect()
This method does nothing in this implementation but is required to be implemented.Returns the input stream - in this case the content of the URL.Methods inherited from class java.net.URLConnection
addRequestProperty, getAllowUserInteraction, getConnectTimeout, getContent, getContent, getContentEncoding, getContentLength, getContentLengthLong, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getHeaderFieldLong, getHeaderFields, getIfModifiedSince, getLastModified, getOutputStream, getPermission, getReadTimeout, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setReadTimeout, setRequestProperty, setUseCaches, toString
-
Field Details
-
JAVASCRIPT_PREFIX
The JavaScript "URL" prefix.- See Also:
-
content_
The JavaScript code.
-
-
Constructor Details
-
JavaScriptURLConnection
Creates an instance.- Parameters:
newUrl
- the JavaScript URL
-
-
Method Details
-
connect
public void connect()This method does nothing in this implementation but is required to be implemented.- Specified by:
connect
in classURLConnection
-
getInputStream
Returns the input stream - in this case the content of the URL.- Overrides:
getInputStream
in classURLConnection
- Returns:
- the input stream
-