Class semper.util.serial.SourceStream
All Packages Class Hierarchy This Package Previous Next Index
Class semper.util.serial.SourceStream
java.lang.Object
|
+----java.io.InputStream
|
+----java.io.FilterInputStream
|
+----java.io.DataInputStream
|
+----semper.util.serial.SourceStream
- public class SourceStream
- extends DataInputStream
- implements StreamInterface, StreamInputInterface
A data input stream that lets you read primitive Java data types
from a stream to internalize the state of an object encoded in the
data stream.
To internalize object o
of class ClassA
, create
a SourceStream object stream
and use its method
readObject to read the object's internal state from
the input stream in
:
SourceStream stream = new SourceStream(in);
ClassA o = (ClassA)stream.readObject();
- Version:
- 2.0, 05/28/96
- Author:
- Günter Karjoth
- See Also:
- Streamable, StreamInputInterface, TargetStream
-
SourceStream(InputStream)
- Creates a new SourceStream.
-
readObject()
- Creates a new object and internalizes its state from the SourceStream.
SourceStream
public SourceStream(InputStream in) throws IOException, StreamIOException
- Creates a new SourceStream.
readObject
public final synchronized Object readObject() throws IOException, StreamIOException
- Creates a new object and internalizes its state from the SourceStream.
- Returns:
- the object
- Throws: StreamDataFormatException
- If the data tag read from the
SourceStream is not of
STRINGTYPE
.
- Throws: NoStreamableClassException
- If a subobject does not
implement the Streamable interface.
- Throws: IOException
- Otherwise.
All Packages Class Hierarchy This Package Previous Next Index