| java.io.ObjectInputStream org.cougaar.core.persist.PersistenceInputStream
PersistenceInputStream | public class PersistenceInputStream extends ObjectInputStream implements PersistenceStream(Code) | | Read persisted objects from a stream. Detects objects that have
been wrapped in a PersistenceAssociation and resolves those to the
current definition of the object. The first occurence of any object
must be inside a PersistenceAssociation. This defining instance is
stored in the identityTable. Thereafter, its values are updated
from later versions of the same object.
|
PersistenceInputStream | public PersistenceInputStream(ObjectInputStream ois, Logger logger) throws IOException(Code) | | Construct from the object stream
Parameters: ois - ObjectInputStream Parameters: logger - Logger to use for progress |
checkSuperclass | static void checkSuperclass()(Code) | | |
getIdentityTable | public IdentityTable getIdentityTable()(Code) | | Get the IdentityTable being used by this stream. This is not
normally used since the IdentityTable is usually maintained by
the creator of this stream.
the IdentityTable being used by this stream. |
newInstanceFromDesc | protected Object newInstanceFromDesc(ObjectStreamClass desc) throws InstantiationException, IllegalAccessException, java.lang.reflect.InvocationTargetException(Code) | | Allocate an object to be filled in from the serialized
stream. This is a hook provided by the ObjectInputStream class
for obtaining an object whose fields can be filled in. Normally,
this returns a brand new object, but during rehydration we need
to update the values of objects that already exist so we override
this method and return existing objects corresponding to the
reference ids we expect to encounter.
Parameters: desc - description of class to create the object to be filled in. |
readAssociation | public PersistenceAssociation readAssociation(PersistenceReference[] references) throws IOException, ClassNotFoundException(Code) | | Read the association for one object. This is the inverse of
PersistenceOutputStream.writeAssociation. The active state of the
PersistenceAssociation is set according to whether it was active
when the persistence delta was generated.
Parameters: references - the array of references for objects that werewritten when this association was written. This allows us to knowin advance the identity of each object as it is read. |
resolveObject | protected Object resolveObject(Object o) throws IOException(Code) | | Resolve an object just read from the stream into the actual
result object. We replace PersistenceReference objects with the
object to which they refer.
Parameters: o - the object to resolve. the replacement. |
setIdentityTable | public void setIdentityTable(IdentityTable identityTable)(Code) | | Set the IdentityTable to be used by this stream. The
IdentityTable contains assocations of objects to earlier
persistence deltas. References to these earlier objects are
replaced with reference objects to save space.
Parameters: identityTable - the new IdentityTable to use. |
Methods inherited from java.io.ObjectInputStream | public int available() throws IOException(Code)(Java Doc) public void close() throws IOException(Code)(Java Doc) public void defaultReadObject() throws IOException, ClassNotFoundException(Code)(Java Doc) protected boolean enableResolveObject(boolean enable) throws SecurityException(Code)(Java Doc) protected Object newInstanceFromDesc(ObjectStreamClass desc) throws InstantiationException, IllegalAccessException, java.lang.reflect.InvocationTargetException(Code)(Java Doc) public int read() throws IOException(Code)(Java Doc) public int read(byte[] buf, int off, int len) throws IOException(Code)(Java Doc) public boolean readBoolean() throws IOException(Code)(Java Doc) public byte readByte() throws IOException(Code)(Java Doc) public char readChar() throws IOException(Code)(Java Doc) protected ObjectStreamClass readClassDescriptor() throws IOException, ClassNotFoundException(Code)(Java Doc) public double readDouble() throws IOException(Code)(Java Doc) public ObjectInputStream.GetField readFields() throws IOException, ClassNotFoundException(Code)(Java Doc) public float readFloat() throws IOException(Code)(Java Doc) public void readFully(byte[] buf) throws IOException(Code)(Java Doc) public void readFully(byte[] buf, int off, int len) throws IOException(Code)(Java Doc) public int readInt() throws IOException(Code)(Java Doc) public String readLine() throws IOException(Code)(Java Doc) public long readLong() throws IOException(Code)(Java Doc) final public Object readObject() throws IOException, ClassNotFoundException(Code)(Java Doc) protected Object readObjectOverride() throws IOException, ClassNotFoundException(Code)(Java Doc) public short readShort() throws IOException(Code)(Java Doc) protected void readStreamHeader() throws IOException, StreamCorruptedException(Code)(Java Doc) public String readUTF() throws IOException(Code)(Java Doc) public Object readUnshared() throws IOException, ClassNotFoundException(Code)(Java Doc) public int readUnsignedByte() throws IOException(Code)(Java Doc) public int readUnsignedShort() throws IOException(Code)(Java Doc) final protected Object real_newInstanceFromDesc(ObjectStreamClass desc) throws InstantiationException, IllegalAccessException, java.lang.reflect.InvocationTargetException(Code)(Java Doc) public void registerValidation(ObjectInputValidation obj, int prio) throws NotActiveException, InvalidObjectException(Code)(Java Doc) protected Class> resolveClass(ObjectStreamClass desc) throws IOException, ClassNotFoundException(Code)(Java Doc) protected Object resolveObject(Object obj) throws IOException(Code)(Java Doc) protected Class> resolveProxyClass(String[] interfaces) throws IOException, ClassNotFoundException(Code)(Java Doc) public int skipBytes(int len) throws IOException(Code)(Java Doc)
|
|
|