protected class ArchiveURIHandlerImpl.Archive extends ArchiveURLConnection
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<?,?> |
options |
protected java.util.zip.ZipEntry |
zipEntry |
urlString| Constructor and Description |
|---|
ArchiveURIHandlerImpl.Archive(URI uri,
java.util.Map<?,?> options) |
| Modifier and Type | Method and Description |
|---|---|
protected java.io.InputStream |
createInputStream(java.lang.String nestedURL)
Creates an input stream for the nested URL by calling
opening a stream on it. |
protected java.io.OutputStream |
createOutputStream(java.lang.String nestedURL)
Creates an output stream for the nested URL by calling
opening a stream on it. |
protected boolean |
emulateArchiveScheme()
Returns whether the implementation will handle all the archive accessors directly.
|
java.util.Map<java.lang.String,?> |
getAttributes() |
void |
setAttributes(java.util.Map<java.lang.String,?> attributes) |
protected boolean |
useZipFile()
Returns whether to handle the special case of a nested URL with file: schema using a
ZipFile. |
protected java.io.InputStream |
yield(java.util.zip.ZipEntry zipEntry,
java.io.InputStream inputStream) |
protected java.io.OutputStream |
yield(java.util.zip.ZipEntry zipEntry,
java.io.OutputStream outputStream) |
connect, delete, getInputStream, getNestedURL, getOutputStream, setTimeStampaddRequestProperty, 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, getPermission, getReadTimeout, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setReadTimeout, setRequestProperty, setUseCaches, toStringprotected java.util.Map<?,?> options
protected java.util.zip.ZipEntry zipEntry
public ArchiveURIHandlerImpl.Archive(URI uri, java.util.Map<?,?> options)
protected boolean emulateArchiveScheme()
ArchiveURLConnectionarchive:jar:file:///c:/temp/example.zip!/org/example/nested.zip!/org/example/deeply-nested.htmlwill be handled as if it were specified as
archive:file:///c:/temp/example.zip!/org/example/nested.zip!/org/example/deeply-nested.htmlOverride this only if you are reusing the logic of retrieving an input stream into an archive and hence are likely to be overriding createInputStream, which is the point of delegation to the nested URL for recursive stream creation.
emulateArchiveScheme in class ArchiveURLConnectionprotected boolean useZipFile()
ArchiveURLConnectionZipFile.
This gives more efficient direct access to the root entry, e.g.,
archive:file:///c:/temp/example.zip!/org/example/nested.html
useZipFile in class ArchiveURLConnectionprotected java.io.InputStream createInputStream(java.lang.String nestedURL)
throws java.io.IOException
ArchiveURLConnectionopening a stream on it.createInputStream in class ArchiveURLConnectionnestedURL - the nested URL for which a stream is required.java.io.IOExceptionprotected java.io.OutputStream createOutputStream(java.lang.String nestedURL)
throws java.io.IOException
ArchiveURLConnectionopening a stream on it.createOutputStream in class ArchiveURLConnectionnestedURL - the nested URL for which a stream is required.java.io.IOExceptionprotected java.io.InputStream yield(java.util.zip.ZipEntry zipEntry,
java.io.InputStream inputStream)
throws java.io.IOException
yield in class ArchiveURLConnectionjava.io.IOExceptionprotected java.io.OutputStream yield(java.util.zip.ZipEntry zipEntry,
java.io.OutputStream outputStream)
throws java.io.IOException
yield in class ArchiveURLConnectionjava.io.IOExceptionpublic java.util.Map<java.lang.String,?> getAttributes()
public void setAttributes(java.util.Map<java.lang.String,?> attributes)
throws java.io.IOException
java.io.IOException