public class MemoryArchive extends Object implements InputStreamPump.Pump
MemoryArchive
...Archive.Entry
Constructor and Description |
---|
MemoryArchive(boolean metaOnly) |
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.
|
void |
open(boolean strict)
Opens the archive.
|
InputStream |
openInputStream(Archive.Entry entry)
Opens an input stream for the given entry
|
void |
run(InputStream in) |
public MemoryArchive(boolean metaOnly) throws IOException
IOException
public void run(InputStream in) throws Exception
run
in interface InputStreamPump.Pump
Exception
public void open(boolean strict) throws IOException
Archive
open
in interface Archive
strict
- 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
Archive
openInputStream
in interface Archive
entry
- the entryIOException
- if an error occurspublic VaultInputSource getInputSource(Archive.Entry entry) throws IOException
Archive
getInputSource
in interface Archive
entry
- the entryIOException
- if an error occurspublic Archive.Entry getRoot() throws IOException
Archive
getRoot
in interface Archive
IOException
- if an error occurspublic MetaInf getMetaInf()
Archive
getMetaInf
in interface Archive
public void close()
Archive
public Archive.Entry getEntry(String path) throws IOException
Archive
getEntry
in interface Archive
path
- the pathnull
if not found.IOException
- if an error occurspublic Archive.Entry getJcrRoot() throws IOException
Archive
null
is returned.getJcrRoot
in interface Archive
null
IOException
- if an error occurspublic Archive getSubArchive(String rootPath, boolean asJcrRoot) throws 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.IOException
- if an error occurs"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"