Class semper.util.serial.TargetStream
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.util.serial.TargetStream

java.lang.Object
   |
   +----java.io.OutputStream
           |
           +----java.io.FilterOutputStream
                   |
                   +----java.io.DataOutputStream
                           |
                           +----semper.util.serial.TargetStream

public class TargetStream
extends DataOutputStream
implements StreamInterface, StreamOutputInterface
A data output stream that lets you write primitive Java data types to the stream to externalize the state of an object.

To externalize object o, create a TargetStream object stream and use its method writeObject() to write the object's internal state to output stream out:

TargetStream stream = new TargetStream(out); stream.writeObject(o);
Version:
2.0, 05/28/96
Author:
Günter Karjoth
See Also:
Streamable, StreamOutputInterface, SourceStream

Constructor Index

 o TargetStream(OutputStream)
Creates a new TargetStream.

Method Index

 o sizeOfBoolean()
Returns the size of a TargetStream holding the value of a Boolean.
 o sizeOfChar()
Returns the size of a TargetStream holding the value of a Char.
 o sizeOfDouble()
Returns the size of a TargetStream holding the value of a Double.
 o sizeOfFloat()
Returns the size of a TargetStream holding the value of a Float.
 o sizeOfInt()
Returns the size of a TargetStream holding the value of an Integer.
 o sizeOfLong()
Returns the size of a TargetStream holding the value of a Long.
 o sizeOfObject(Object)
Returns the size of a TargetStream holding the internal state of the Object.
 o writeObject(Object)
Externalizes an object by writing its state to the TargetStream.

Constructors

 o TargetStream
  public TargetStream(OutputStream out) throws IOException, StreamIOException
Creates a new TargetStream.

Methods

 o writeObject
  public final synchronized void writeObject(Object o) throws IOException, StreamIOException
Externalizes an object by writing its state to the TargetStream.
Throws: IOException
Otherwise.
 o sizeOfBoolean
  public static int sizeOfBoolean()
Returns the size of a TargetStream holding the value of a Boolean.
 o sizeOfChar
  public static int sizeOfChar()
Returns the size of a TargetStream holding the value of a Char.
 o sizeOfDouble
  public static int sizeOfDouble()
Returns the size of a TargetStream holding the value of a Double.
 o sizeOfFloat
  public static int sizeOfFloat()
Returns the size of a TargetStream holding the value of a Float.
 o sizeOfInt
  public static int sizeOfInt()
Returns the size of a TargetStream holding the value of an Integer.
 o sizeOfLong
  public static int sizeOfLong()
Returns the size of a TargetStream holding the value of a Long.
 o sizeOfObject
  public static int sizeOfObject(Object o) throws StreamIOException
Returns the size of a TargetStream holding the internal state of the Object.

All Packages  Class Hierarchy  This Package  Previous  Next  Index