| |
|
| java.lang.Object java.io.OutputStream java.io.ObjectOutputStream org.archive.io.ObjectPlusFilesOutputStream
ObjectPlusFilesOutputStream | public class ObjectPlusFilesOutputStream extends ObjectOutputStream (Code) | | Enhanced ObjectOutputStream which maintains (a stack of) auxiliary
directories and offers convenience methods for serialized objects
to save their related disk files alongside their serialized version.
author: gojomo |
getAuxiliaryDirectory | public File getAuxiliaryDirectory()(Code) | | Return the current auxiliary directory for storing
files associated with serialized objects.
Auxillary directory. |
popAuxiliaryDirectory | public void popAuxiliaryDirectory()(Code) | | Remove the top subdirectory.
|
pushAuxiliaryDirectory | public void pushAuxiliaryDirectory(String dir)(Code) | | Add another subdirectory for any file-capture needs during the
current serialization.
Parameters: dir - |
snapshotAppendOnlyFile | public void snapshotAppendOnlyFile(File file) throws IOException(Code) | | Store a snapshot of an object's supporting file to the
current auxiliary directory. Should only be used for
files which are strictly appended-to, because it tries
to use a "hard link" where possible (meaning that
future edits to the original file's contents will
also affect the snapshot).
Remembers current file extent to allow a future restore
to ignore subsequent appended data.
Parameters: file - throws: IOException - |
|
|
|