public class BundleURLConnection extends URLConnection
Modifier and Type | Field and Description |
---|---|
protected BundleEntry |
bundleEntry
BundleEntry that the URL is associated.
|
protected String |
contentType
content type for this URLConnection
|
protected InputStream |
in
InputStream for this URLConnection.
|
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches
Constructor and Description |
---|
BundleURLConnection(URL url,
BundleEntry bundleEntry)
Constructor for a BundleClassLoader resource URLConnection.
|
Modifier and Type | Method and Description |
---|---|
void |
connect() |
int |
getContentLength() |
String |
getContentType() |
boolean |
getDoInput() |
boolean |
getDoOutput() |
URL |
getFileURL()
Converts the URL to a URL that uses the file: protocol.
|
InputStream |
getInputStream() |
long |
getLastModified() |
URL |
getLocalURL()
Converts the URL to a common local URL protocol (i.e file: or jar: protocol)
|
addRequestProperty, getAllowUserInteraction, getConnectTimeout, getContent, getContent, getContentEncoding, getContentLengthLong, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getExpiration, getFileNameMap, getHeaderField, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getHeaderFieldLong, getHeaderFields, getIfModifiedSince, getOutputStream, getPermission, getReadTimeout, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setReadTimeout, setRequestProperty, setUseCaches, toString
protected final BundleEntry bundleEntry
protected InputStream in
protected String contentType
public BundleURLConnection(URL url, BundleEntry bundleEntry)
url
- URL for this URLConnection.bundleEntry
- BundleEntry that the URLConnection is associated.public void connect() throws IOException
connect
in class URLConnection
IOException
public int getContentLength()
getContentLength
in class URLConnection
public String getContentType()
getContentType
in class URLConnection
public boolean getDoInput()
getDoInput
in class URLConnection
public boolean getDoOutput()
getDoOutput
in class URLConnection
public InputStream getInputStream() throws IOException
getInputStream
in class URLConnection
IOException
public long getLastModified()
getLastModified
in class URLConnection
public URL getLocalURL()
public URL getFileURL()
Copyright © 2007–2018 The Apache Software Foundation. All rights reserved.