public class DataURLConnection extends URLConnection
Modifier and Type | Field and Description |
---|---|
static String |
DATA_PREFIX
The "URL" prefix 'data:'.
|
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches
Constructor and Description |
---|
DataURLConnection(URL url)
Creates an instance.
|
Modifier and Type | Method and Description |
---|---|
void |
connect()
This method does nothing in this implementation but is required to be implemented.
|
String |
getCharset()
Gets the charset information specified in the data URL.
|
InputStream |
getInputStream()
Returns the input stream - in this case the content of the URL.
|
String |
getMediaType()
Gets the media type information contained in the data URL.
|
addRequestProperty, getAllowUserInteraction, getConnectTimeout, getContent, getContent, getContentEncoding, getContentLength, getContentLengthLong, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, 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, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setReadTimeout, setRequestProperty, setUseCaches, toString
public static final String DATA_PREFIX
public DataURLConnection(URL url) throws UnsupportedEncodingException
url
- the data URLUnsupportedEncodingException
- in case the encoding is not supportedpublic void connect()
connect
in class URLConnection
public InputStream getInputStream()
getInputStream
in class URLConnection
public String getCharset()
public String getMediaType()
Copyright © 2002–2024 Gargoyle Software Inc.. All rights reserved.