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.
| Modifier | Constructor and Description | 
|---|---|
  | 
NuxeoArchiveReader(File file)
Create a  
NuxeoArchiveReader from a File. | 
  | 
NuxeoArchiveReader(InputStream in)
Create a  
NuxeoArchiveReader from an InputStream. | 
protected  | 
NuxeoArchiveReader(ZipInputStream in,
                  boolean checkMarker)
Protected constructor used by  
ZipReader. | 
| Modifier and Type | Method and Description | 
|---|---|
protected void | 
buildOrderedZipIndex()  | 
void | 
close()
Closes the reader. 
 | 
static boolean | 
isMarkerEntry(ZipEntry entry)  | 
ExportedDocument | 
read()
Reads a single document. 
 | 
protected ExportedDocument | 
readOrderedStream()  | 
protected ExportedDocument | 
readZip()  | 
readpublic 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 NuxeoArchiveWriterIOExceptionprotected NuxeoArchiveReader(ZipInputStream in, boolean checkMarker) throws IOException
ZipReader. Must not close the stream when done.IOExceptionpublic 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 archiveIOExceptionprotected void buildOrderedZipIndex()
public ExportedDocument read() throws IOException
DocumentReaderread in interface DocumentReaderread in class AbstractDocumentReaderIOExceptionprotected ExportedDocument readZip() throws IOException
IOExceptionprotected ExportedDocument readOrderedStream() throws IOException
IOExceptionpublic void close()
DocumentReaderpublic static boolean isMarkerEntry(ZipEntry entry)
Copyright © 2019 Nuxeo. All rights reserved.