FileOutput<T>, Output<T>, java.io.Closeable, java.lang.AutoCloseablepublic class BinFileOutput<T> extends BinOutput<T> implements FileOutput<T>
An item input implementation serializing something to the specified file.
WARNING: doesn't support the appending of the previously used output file (already containing the data which had been output earlier). This limitation is due to Java serialization, which adds the new header on each new ObjectOutputStream instance.
| Modifier and Type | Field | Description |
|---|---|---|
protected java.nio.file.Path |
dstPath |
OUTPUT_OPEN_OPTIONS| Constructor | Description |
|---|---|
BinFileOutput() |
Opens the temporary output file with ".bin" extension and random name.
|
BinFileOutput(java.nio.file.Path dstPath) |
| Modifier and Type | Method | Description |
|---|---|---|
java.nio.file.Path |
getFilePath() |
|
BinFileInput<T> |
getInput() |
Make a
Input instance from this. |
java.lang.String |
toString() |
public BinFileOutput(java.nio.file.Path dstPath)
throws java.io.IOException
dstPath - the path to the file which should be used to store the serialized itemsjava.io.IOException - if unable to open the file for writingpublic BinFileOutput()
throws java.io.IOException
java.io.IOExceptionpublic BinFileInput<T> getInput() throws java.io.IOException
OutputInput instance from this.public final java.nio.file.Path getFilePath()
getFilePath in interface FileOutput<T>