public class ObjectPlusFilesInputStream
extends java.io.ObjectInputStream
| Modifier and Type | Field and Description |
|---|---|
protected java.util.LinkedList<java.io.File> |
auxiliaryDirectoryStack |
protected java.util.LinkedList<java.lang.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(java.io.InputStream in,
java.io.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.
|
java.io.File |
getAuxiliaryDirectory()
Return the top auxiliary directory, from
which saved files are restored.
|
void |
popAuxiliaryDirectory()
Discard the top auxiliary directory.
|
void |
pushAuxiliaryDirectory(java.lang.String dir)
Push another default storage directory for use
until popped.
|
void |
registerFinishTask(java.lang.Runnable task)
Register a task to be done when the ObjectPlusFilesInputStream
is closed.
|
void |
restoreFile(java.io.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(java.io.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, skipBytesprotected java.util.LinkedList<java.io.File> auxiliaryDirectoryStack
protected java.util.LinkedList<java.lang.Runnable> postRestoreTasks
public ObjectPlusFilesInputStream(java.io.InputStream in,
java.io.File storeDir)
throws java.io.IOException
in - storeDir - java.io.IOExceptionpublic void pushAuxiliaryDirectory(java.lang.String dir)
dir - public void popAuxiliaryDirectory()
public java.io.File getAuxiliaryDirectory()
public void restoreFile(java.io.File destination)
throws java.io.IOException
destination - java.io.IOExceptionpublic void restoreFileTo(java.io.File directory)
throws java.io.IOException
directory - java.io.IOExceptionpublic void registerFinishTask(java.lang.Runnable task)
task - public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.io.ObjectInputclose in interface java.lang.AutoCloseableclose in class java.io.ObjectInputStreamjava.io.IOExceptionInputStream.close()Copyright © 2019 The International Internet Preservation Consortium. All Rights Reserved.