org.modeshape.jcr
Class BackupDocumentReader
java.lang.Object
org.modeshape.jcr.BackupDocumentReader
@NotThreadSafe
public final class BackupDocumentReader
- extends Object
A utility that writes Document
instances to one or more sequential files in a backup directory.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GZIP_EXTENSION
public static final String GZIP_EXTENSION
- See Also:
- Constant Field Values
DOCUMENTS_EXTENSION
public static final String DOCUMENTS_EXTENSION
- See Also:
- Constant Field Values
stream
protected InputStream stream
documents
protected DocumentSequence documents
fileCount
protected long fileCount
BackupDocumentReader
public BackupDocumentReader(File parentDirectory,
String filenamePrefix,
Problems problems)
read
public Document read()
- Read the next document from the files.
- Returns:
- the document, or null if there are no more documents
openNextFile
protected InputStream openNextFile()
throws IOException
- Throws:
IOException
close
protected void close(InputStream stream)
close
public void close()
- Close this writer, which flushes and closes any currently-open streams. Even after this is called, additional documents can
be written to additional files.
Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.