equip.runtime
Class ObjectInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended byjava.io.FilterInputStream
          extended byjava.io.DataInputStream
              extended byequip.runtime.ObjectInputStream
All Implemented Interfaces:
java.io.DataInput

public class ObjectInputStream
extends java.io.DataInputStream

EQUIP-specific serialisation input stream for reading serialised instances of ValueBase from. Used in place of ObjectInputStream since the serialisation is the same for EQUIP IDL-defined classes in C++ as well.


Field Summary
(package private) static java.lang.ClassLoader loader
          shared loader
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
ObjectInputStream(java.io.InputStream in)
          Construct over a InputStream.
 
Method Summary
 ValueBase readObject()
          read an object (subclass of ValueBase) from the input stream; handles nulls ok.
 void readObjectEnd()
          Internal operation use by object de-serialisers
 void readObjectStart()
          Internal operation use by object de-serialisers
 java.lang.String readString()
          Read a Java string from the stream (handles nulls ok).
 
Methods inherited from class java.io.DataInputStream
read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, readUTF, skipBytes
 
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

loader

static java.lang.ClassLoader loader
shared loader

Constructor Detail

ObjectInputStream

public ObjectInputStream(java.io.InputStream in)
                  throws java.io.IOException
Construct over a InputStream. Note: like ObjectInputStream, this constructor will block until it has read some information from the input stream that is generated by the corresponding ObjectOutputStream; if this information is not available (e.g. due to order of stream creation, or buffering) then you may get deadlock.

Throws:
java.io.IOException - If stream does not appear to originate from a compatible ObjectOutputStream.
Method Detail

readString

public java.lang.String readString()
                            throws java.io.IOException
Read a Java string from the stream (handles nulls ok).

Throws:
java.io.IOException

readObject

public ValueBase readObject()
                     throws java.io.IOException,
                            java.lang.ClassNotFoundException,
                            java.lang.InstantiationException
read an object (subclass of ValueBase) from the input stream; handles nulls ok.

Returns:
De-serialised object, or null if null was written explicitly to the stream.
Throws:
java.io.IOException - Miscellaneous problem, e.g. end of stream.
java.lang.ClassNotFoundException - The class named in the stream could not be loaded in this JVM.
java.lang.InstantiationException - There was a problem creating an instance of the class named in the stream.

readObjectStart

public void readObjectStart()
                     throws java.io.IOException
Internal operation use by object de-serialisers

Throws:
java.io.IOException

readObjectEnd

public void readObjectEnd()
                   throws java.io.IOException
Internal operation use by object de-serialisers

Throws:
java.io.IOException