public class ZipStreamArchive
extends java.lang.Object
Archive.Entry
Constructor and Description |
---|
ZipStreamArchive(java.io.InputStream in)
Creates an ew zip stream archive on the given input stream.
|
ZipStreamArchive(java.io.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(java.lang.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(java.lang.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.
|
java.io.InputStream |
openInputStream(Archive.Entry entry)
Opens an input stream for the given entry
|
public ZipStreamArchive(java.io.InputStream in)
in
- the input stream to read from.public ZipStreamArchive(java.io.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 java.io.IOException
Archive
strict
- if true
open will fail if there was an
internal error while parsing meta data.java.io.IOException
- if an error occurspublic java.io.InputStream openInputStream(Archive.Entry entry) throws java.io.IOException
Archive
entry
- the entrynull
if the entry can't be readjava.io.IOException
- if an error occurspublic VaultInputSource getInputSource(Archive.Entry entry) throws java.io.IOException
Archive
entry
- the entrynull
if the entry can't be readjava.io.IOException
- if an error occurspublic MetaInf getMetaInf()
Archive
public void close()
Archive
public Archive.Entry getRoot() throws java.io.IOException
Archive
java.io.IOException
- if an error occurspublic boolean isBuffered()
true
if buffered.public Archive.Entry getEntry(java.lang.String path) throws java.io.IOException
Archive
public Archive.Entry getJcrRoot() throws java.io.IOException
Archive
null
is returned.getJcrRoot
in interface Archive
null
java.io.IOException
- if an error occurspublic Archive getSubArchive(java.lang.String rootPath, boolean asJcrRoot) throws java.io.IOException
Archive
getSubArchive
in interface Archive
rootPath
- root pathasJcrRoot
- if true
the given root is the jcr_rootnull
if entry specified by root
does not exist.java.io.IOException
- if an error occurs"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"