public class NuxeoArchiveReader extends AbstractDocumentReader
NuxeoArchiveWriter
.
If you need to read a CoreIO XML Archive that was not directly generated by
NuxeoArchiveWriter
or that was modified you need to use the
NuxeoArchiveReader(File) constructor.
Constructor and Description |
---|
NuxeoArchiveReader(File file)
Create a
NuxeoArchiveReader from a File . |
NuxeoArchiveReader(InputStream in)
Create a
NuxeoArchiveReader from an InputStream . |
NuxeoArchiveReader(URL url)
Create a
NuxeoArchiveReader from a url. |
NuxeoArchiveReader(ZipInputStream in)
Create a
NuxeoArchiveReader from an ZipInputStream . |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the reader.
|
static boolean |
isMarkerEntry(ZipEntry entry) |
ExportedDocument |
read()
Reads a single document.
|
read
public NuxeoArchiveReader(URL url) throws IOException
NuxeoArchiveReader
from a url.
The url must point to an archive that was generated by
NuxeoArchiveWriter
.
url
- url to an archive that was generated by NuxeoArchiveWriterIOException
public NuxeoArchiveReader(File file) throws IOException
NuxeoArchiveReader
from a File
.
This constructor is different from others because it allows the input zip
file to have been generated by an other engine that
NuxeoArchiveWriter
.
In particular, you can use this constructor on a Zip Archive that was manually modified.
in
- InputStream pointing an archive that was generated by
NuxeoArchiveWriterIOException
public NuxeoArchiveReader(InputStream in) throws IOException
NuxeoArchiveReader
from an InputStream
.
The InputStream must point to an archive that was generated by
NuxeoArchiveWriter
.
in
- InputStream pointing an archive that was generated by
NuxeoArchiveWriterIOException
public NuxeoArchiveReader(ZipInputStream in) throws IOException
NuxeoArchiveReader
from an ZipInputStream
.
The ZipInputStream must point to an archive that was generated by
NuxeoArchiveWriter
.
in
- ZipInputStream pointing an archive that was generated by
NuxeoArchiveWriterIOException
public ExportedDocument read() throws IOException
DocumentReader
read
in interface DocumentReader
read
in class AbstractDocumentReader
IOException
public void close()
DocumentReader
public static boolean isMarkerEntry(ZipEntry entry)
Copyright © 2013 Nuxeo SA. All Rights Reserved.