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 StringThe JavaScript code.static final StringThe JavaScript "URL" prefix.Fields inherited from class java.net.URLConnection
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconnect()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:
connectin classURLConnection
-
getInputStream
Returns the input stream - in this case the content of the URL.- Overrides:
getInputStreamin classURLConnection- Returns:
- the input stream
-