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, toStringpublic void connect()
connect in class URLConnectionpublic int getContentLength()
getContentLength in class URLConnectionpublic long getContentLengthLong()
getContentLengthLong in class URLConnectionpublic String getContentType()
text/plain;charset=US-ASCII, as specified in
RFC 2397.getContentType in class URLConnectionpublic 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 URLConnectionpublic InputStream getInputStream() throws IOException
getInputStream in class URLConnectionIOExceptionCopyright © 2017–2023. All rights reserved.