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.
This implementation holds either a ZipInputStream
, in which case it is assumed to have been generated by
NuxeoArchiveWriter
and has a special format (TODO DOCUMENT), or it holds a ZipFile
that may be used
in a random-access manner.
Constructor and Description |
---|
NuxeoArchiveReader(File file)
Create a
NuxeoArchiveReader from a File . |
NuxeoArchiveReader(InputStream in)
Create a
NuxeoArchiveReader from an InputStream . |
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(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(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.
file
- a Zip archiveIOException
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 © 2015 Nuxeo SA. All rights reserved.