public class ObjectPlusFilesInputStream extends ObjectInputStream
ObjectInputStream.GetField| Modifier and Type | Field and Description |
|---|---|
protected LinkedList<File> |
auxiliaryDirectoryStack |
protected LinkedList<Runnable> |
postRestoreTasks |
baseWireHandle, PROTOCOL_VERSION_1, PROTOCOL_VERSION_2, SC_BLOCK_DATA, SC_ENUM, SC_EXTERNALIZABLE, SC_SERIALIZABLE, SC_WRITE_METHOD, STREAM_MAGIC, STREAM_VERSION, SUBCLASS_IMPLEMENTATION_PERMISSION, SUBSTITUTION_PERMISSION, TC_ARRAY, TC_BASE, TC_BLOCKDATA, TC_BLOCKDATALONG, TC_CLASS, TC_CLASSDESC, TC_ENDBLOCKDATA, TC_ENUM, TC_EXCEPTION, TC_LONGSTRING, TC_MAX, TC_NULL, TC_OBJECT, TC_PROXYCLASSDESC, TC_REFERENCE, TC_RESET, TC_STRING| Constructor and Description |
|---|
ObjectPlusFilesInputStream(InputStream in,
File storeDir)
Instantiate over the given stream and using the supplied
auxiliary storage directory.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
In addition to default, do any registered cleanup tasks.
|
File |
getAuxiliaryDirectory()
Return the top auxiliary directory, from
which saved files are restored.
|
void |
popAuxiliaryDirectory()
Discard the top auxiliary directory.
|
void |
pushAuxiliaryDirectory(String dir)
Push another default storage directory for use
until popped.
|
void |
registerFinishTask(Runnable task)
Register a task to be done when the ObjectPlusFilesInputStream
is closed.
|
void |
restoreFile(File destination)
Restore a file from storage, using the name and length
info on the serialization stream and the file from the
current auxiliary directory, to the given File.
|
void |
restoreFileTo(File directory)
Restore a file from storage, using the name and length
info on the serialization stream and the file from the
current auxiliary directory, to the given File.
|
available, defaultReadObject, enableResolveObject, read, read, readBoolean, readByte, readChar, readClassDescriptor, readDouble, readFields, readFloat, readFully, readFully, readInt, readLine, readLong, readObject, readObjectOverride, readShort, readStreamHeader, readUnshared, readUnsignedByte, readUnsignedShort, readUTF, registerValidation, resolveClass, resolveObject, resolveProxyClass, skipBytesmark, markSupported, read, reset, skipclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitread, skipprotected LinkedList<File> auxiliaryDirectoryStack
protected LinkedList<Runnable> postRestoreTasks
public ObjectPlusFilesInputStream(InputStream in, File storeDir) throws IOException
in - storeDir - IOExceptionpublic void pushAuxiliaryDirectory(String dir)
dir - public void popAuxiliaryDirectory()
public File getAuxiliaryDirectory()
public void restoreFile(File destination) throws IOException
destination - IOExceptionpublic void restoreFileTo(File directory) throws IOException
directory - IOExceptionpublic void registerFinishTask(Runnable task)
task - public void close()
throws IOException
close in interface Closeableclose in interface ObjectInputclose in interface AutoCloseableclose in class ObjectInputStreamIOExceptionInputStream.close()Copyright © 2015 The International Internet Preservation Consortium. All Rights Reserved.