public class ZipStreamArchive extends Object
Archive.Entry| Constructor and Description |
|---|
ZipStreamArchive(InputStream in)
Creates a new zip stream archive on the given input stream.
|
ZipStreamArchive(InputStream in,
int maxBufferSize)
Creates an ew zip stream archive on the given input stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
closes the archive
|
Archive.Entry |
getEntry(String path)
Returns the entry specified by path.
|
VaultInputSource |
getInputSource(Archive.Entry entry)
Returns an input source for the given entry
|
Archive.Entry |
getJcrRoot()
Returns the entry that specifies the "jcr_root".
|
MetaInf |
getMetaInf()
Returns the meta inf.
|
Archive.Entry |
getRoot()
Returns the root entry.
|
Archive |
getSubArchive(String rootPath,
boolean asJcrRoot)
Returns a sub archive that is rooted at the given path.
|
boolean |
isBuffered()
Checks if this archive is currently buffered (and not using a temporary file).
|
void |
open(boolean strict)
Opens the archive.
|
InputStream |
openInputStream(Archive.Entry entry)
Opens an input stream for the given entry
|
public ZipStreamArchive(@Nonnull InputStream in)
in - the input stream to read from.public ZipStreamArchive(@Nonnull InputStream in, int maxBufferSize)
in - the input stream to read from.maxBufferSize - size of buffer to keep content in memory.public void open(boolean strict)
throws IOException
Archivestrict - if true open will fail if there was an
internal error while parsing meta data.IOException - if an error occurspublic InputStream openInputStream(Archive.Entry entry) throws IOException
Archiveentry - the entrynull if the entry can't be readIOException - if an error occurspublic VaultInputSource getInputSource(Archive.Entry entry) throws IOException
Archiveentry - the entrynull if the entry can't be readIOException - if an error occurspublic MetaInf getMetaInf()
Archivepublic void close()
Archivepublic Archive.Entry getRoot() throws IOException
ArchiveIOException - if an error occurspublic boolean isBuffered()
true if buffered.public Archive.Entry getEntry(String path) throws IOException
ArchivegetEntry in interface Archivepath - the pathnull if not found.IOException - if an error occurspublic Archive.Entry getJcrRoot() throws IOException
Archivenull is returned.getJcrRoot in interface ArchivenullIOException - if an error occurspublic Archive getSubArchive(String rootPath, boolean asJcrRoot) throws IOException
ArchivegetSubArchive in interface ArchiverootPath - root pathasJcrRoot - if true the given root is the jcr_rootnull if entry specified by root
does not exist.IOException - if an error occursCopyright © 2010 - 2020 Adobe. All Rights Reserved