com.gargoylesoftware.htmlunit.protocol.data
Class DataURLConnection

java.lang.Object
  extended by java.net.URLConnection
      extended by com.gargoylesoftware.htmlunit.protocol.data.DataURLConnection

public class DataURLConnection
extends URLConnection

A URLConnection for supporting data URLs.

Version:
$Revision: 5563 $
Author:
Marc Guillemot
See Also:
RFC2397

Field Summary
static String DATA_PREFIX
          The JavaScript "URL" prefix.
 
Fields inherited from class java.net.URLConnection
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches
 
Constructor Summary
DataURLConnection(URL url)
          Creates an instance.
 
Method Summary
 void connect()
          This method does nothing in this implementation but is required to be implemented.
 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, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getHeaderFields, getIfModifiedSince, getLastModified, getOutputStream, getPermission, getReadTimeout, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setReadTimeout, setRequestProperty, setUseCaches, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DATA_PREFIX

public static final String DATA_PREFIX
The JavaScript "URL" prefix.

See Also:
Constant Field Values
Constructor Detail

DataURLConnection

public DataURLConnection(URL url)
Creates an instance.

Parameters:
url - the data URL
Method Detail

connect

public void connect()
This method does nothing in this implementation but is required to be implemented.

Specified by:
connect in class URLConnection

getInputStream

public InputStream getInputStream()
Returns the input stream - in this case the content of the URL.

Overrides:
getInputStream in class URLConnection
Returns:
the input stream


Copyright © 2002-2011 Gargoyle Software Inc.. All Rights Reserved.