public class DataURLConnection extends URLConnection
data:
URL as specified in RFC 2397.allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches
Modifier and Type | Method and Description |
---|---|
void |
connect() |
String |
getContentEncoding()
Returns the content encoding of the data URL.
|
int |
getContentLength()
Returns the length of the decoded data part of the data URL.
|
long |
getContentLengthLong()
Returns the length of the decoded data part of the data URL.
|
String |
getContentType()
Returns the media type of the data URL.
|
InputStream |
getInputStream() |
addRequestProperty, getAllowUserInteraction, getConnectTimeout, getContent, getContent, 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 void connect()
connect
in class URLConnection
public int getContentLength()
getContentLength
in class URLConnection
public long getContentLengthLong()
getContentLengthLong
in class URLConnection
public String getContentType()
text/plain;charset=US-ASCII
, as specified in
RFC 2397.getContentType
in class URLConnection
public String getContentEncoding()
If no media type is specified, it is assumed to be text/plain;charset=US-ASCII
, as specified in
RFC 2397. As a result, the content encoding will then be US-ASCII
.
getContentEncoding
in class URLConnection
public InputStream getInputStream() throws IOException
getInputStream
in class URLConnection
IOException
Copyright © 2017–2023. All rights reserved.