Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Beta3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.

Field Summary
`protected DocumentSequence` | `documents`
`static String` | `DOCUMENTS_EXTENSION`
`protected long` | `fileCount`
`static String` | `GZIP_EXTENSION`
`protected InputStream` | `stream`

Constructor Summary
`BackupDocumentReader(File parentDirectory, String filenamePrefix, Problems problems)`

Method Summary
`void` | `close()` Close this writer, which flushes and closes any currently-open streams.
`protected void` | `close(InputStream stream)`
`protected InputStream` | `openNextFile()`
`Document` | `read()` Read the next document from the files.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### 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

Constructor Detail

### BackupDocumentReader

    public BackupDocumentReader(File parentDirectory,
                                String filenamePrefix,
                                Problems problems)

Method Detail

### 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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Beta3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.