public class SnapshotWriter
extends java.lang.Object
| Constructor and Description |
|---|
SnapshotWriter(java.io.Writer output,
java.io.FileDescriptor fileDescriptor,
java.lang.String path)
Creates a SnapshotWriter that appends to
output. |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the underlying output stream.
|
java.io.FileDescriptor |
getFileDescriptor() |
java.io.Writer |
getOutput() |
java.lang.String |
getPath() |
long |
getRecordCount() |
void |
write(DocumentSnapshot snapshot)
Appends a record to the output stream.
|
public SnapshotWriter(java.io.Writer output,
java.io.FileDescriptor fileDescriptor,
java.lang.String path)
throws SnapshotWriterException
output.output - CSV writer that is being wrappedfileDescriptor - if non-{code null}, this will be flushed after
each record is written to diskpath - name of output, for logging purposesSnapshotWriterException - on any errorpublic void write(DocumentSnapshot snapshot) throws SnapshotWriterException, java.lang.IllegalArgumentException
snapshot - record to writeSnapshotWriterExceptionjava.lang.IllegalArgumentExceptionpublic void close()
throws SnapshotWriterException
SnapshotWriterExceptionpublic java.lang.String getPath()
public long getRecordCount()
public java.io.Writer getOutput()
public java.io.FileDescriptor getFileDescriptor()