Package org.htmlunit.protocol.javascript
Class JavaScriptURLConnection
- java.lang.Object
-
- java.net.URLConnection
-
- org.htmlunit.protocol.javascript.JavaScriptURLConnection
-
public class JavaScriptURLConnection extends java.net.URLConnection
A URLConnection for supporting JavaScript URLs.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
content_
The JavaScript code.static java.lang.String
JAVASCRIPT_PREFIX
The JavaScript "URL" prefix.
-
Constructor Summary
Constructors Constructor Description JavaScriptURLConnection(java.net.URL newUrl)
Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
connect()
This method does nothing in this implementation but is required to be implemented.java.io.InputStream
getInputStream()
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 Detail
-
JAVASCRIPT_PREFIX
public static final java.lang.String JAVASCRIPT_PREFIX
The JavaScript "URL" prefix.- See Also:
- Constant Field Values
-
content_
private final java.lang.String content_
The JavaScript code.
-
-
Method Detail
-
connect
public void connect()
This method does nothing in this implementation but is required to be implemented.- Specified by:
connect
in classjava.net.URLConnection
-
getInputStream
public java.io.InputStream getInputStream()
Returns the input stream - in this case the content of the URL.- Overrides:
getInputStream
in classjava.net.URLConnection
- Returns:
- the input stream
-
-