Interface COM.ibm.jaws.mofw.OutputEDStream
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface COM.ibm.jaws.mofw.OutputEDStream

public interface OutputEDStream
extends Object
OutputEDStream is one of the primary mechanisms used in the object server. OutputEDStreams come in many subclasses with special constructors, methods, and internal representations. A OutputEDStream can be very light-weight (e.g., a sequence of three values) or very complex (e.g., an iterator over all the Managed objects in a large database).

In OOD terms, an OutputEDStream is the MOFW representation of a "sink" process and dataflow that accepts data from a "source" process or dataflow. In this case, the canonical form are the Java CORBA datatypes.

These methods each throw a EDStreamFormatError. Like other Java Errors, they do not require the client to either use the catch/throw mechanism or require a throws in the implementation of the method.

It is always the responsibility of the client of a OutputEDStream to know what order to write to the stream.


Method Index

 o writeBegin()
Use this method to indicate the beginning of a variable length sequence.
 o writeBoolean(boolean)
Use this method to write a boolean to this stream.
 o writeByte(byte)
Use this method to write a byte to this stream.
 o writeChar(char)
Use this method to write a char to this stream.
 o writeDouble(double)
Use this method to write a double to this stream.
 o writeEnd()
Use this method to indicate the end of a variable length sequence.
 o writeFloat(float)
Use this method to write a float to this stream.
 o writeInt(int)
Use this method to write an int to this stream.
 o writeLong(long)
Use this method to write a long to this stream.
 o writeManageable(Manageable)
Use readManageable() and writeManageable() when you want to write the object's EssentialData and not preserve its identity.
 o writeManaged(BaseCollection, Managed)
Use writeManaged() and readManaged() when you want identity to be preserved.
 o writeObject(Object)
Use readObject() and writeObject() when you want the stream to handle

Methods

 o writeBegin
  public abstract void writeBegin() throws EDStreamFormatError
Use this method to indicate the beginning of a variable length sequence. This must be done before a writeEnd() call can be made.
Throws: EDStreamFormatError
is raised when the OutputEDStream expects something other than a sequence begin.
 o writeEnd
  public abstract void writeEnd() throws EDStreamFormatError
Use this method to indicate the end of a variable length sequence. This call must follows a writeBegin() call.
Throws: EDStreamFormatError
is raised when the OutputEDStream has no corresponding begin marker.
 o writeBoolean
  public abstract void writeBoolean(boolean value) throws EDStreamFormatError
Use this method to write a boolean to this stream.
Parameters:
value - a boolean to write.
Throws: EDStreamFormatError
is raised when the OutputEDStream expects something other than a boolean.
 o writeByte
  public abstract void writeByte(byte value) throws EDStreamFormatError
Use this method to write a byte to this stream.
Parameters:
value - a byte to write.
Throws: EDStreamFormatError
is raised when the OutputEDStream expects something other than a byte.
 o writeShort
  public abstract void writeShort(short value) throws EDStreamFormatError
Use this method to write a short to this stream.
Parameters:
value - a short to write.
Throws: EDStreamFormatError
is raised when the OutputEDStream expects something other than a short.
 o writeInt
  public abstract void writeInt(int value) throws EDStreamFormatError
Use this method to write an int to this stream.
Parameters:
value - a int to write.
Throws: EDStreamFormatError
is raised when the OutputEDStream expects something other than an int.
 o writeLong
  public abstract void writeLong(long value) throws EDStreamFormatError
Use this method to write a long to this stream.
Parameters:
value - a long to write.
Throws: EDStreamFormatError
is raised when the OutputEDStream expects something other than a long.
 o writeFloat
  public abstract void writeFloat(float value) throws EDStreamFormatError
Use this method to write a float to this stream.
Parameters:
value - a float to write.
Throws: EDStreamFormatError
is raised when the OutputEDStream expects something other than a float.
 o writeDouble
  public abstract void writeDouble(double value) throws EDStreamFormatError
Use this method to write a double to this stream.
Parameters:
value - a double to write.
Throws: EDStreamFormatError
is raised when the OutputEDStream expects something other than a double.
 o writeChar
  public abstract void writeChar(char value) throws EDStreamFormatError
Use this method to write a char to this stream.
Parameters:
value - a char to write.
Throws: EDStreamFormatError
is raised when the OutputEDStream expects something other than a char.
 o writeString
  public abstract void writeString(String value) throws EDStreamFormatError
Use this method to write a string to this stream.
Parameters:
value - a String to write.
Throws: EDStreamFormatError
is raised when the OutputEDStream expects something other than a string.
 o writeObject
  public abstract void writeObject(Object value) throws EDStreamFormatError
Use readObject() and writeObject() when you want the stream to handle
Parameters:
value - a Object to write.
Throws: EDStreamFormatError
is raised when the OutputEDStream expects something other than an object of the type passed in.
 o writeManageable
  public abstract void writeManageable(Manageable value) throws EDStreamFormatError
Use readManageable() and writeManageable() when you want to write the object's EssentialData and not preserve its identity. The following cases are handled: In all cases, a writeManageable() and subsequent readManageable() will create a new object with the same EssentialData.
Parameters:
value - is the Manageable object that is written.
Throws: EDStreamFormatError
is raised when the OutputEDStream expects something other than an object of the type passed in.
 o writeManaged
  public abstract void writeManaged(BaseCollection relativeTo,
                                    Managed value) throws EDStreamFormatError
Use writeManaged() and readManaged() when you want identity to be preserved. That is, if the Managed object is already in memory, then that object is found instead of creating a new copy. This implies that enough of the object's Identifier must be included in the stream to ensure single-copy semantics. Whether the state of the Managed object is included in the stream, via externalizeToStream() and internalizeFromStream(), is up to the stream implementation. This allows (but does not require) multiple objects to be included in the same stream as performance dictates.

In the following code, Managed foo, bar; myStream.writeManaged(foo); bar = myStream.readManaged(); boolean identical = foo.isIdentical(bar); the boolean identical is true.

These methods should be contrasted with writeManageable() and readManageable(), which only preserve equality. In the following code, Manageable foo, bar; myStream.writeManageable(foo); bar = myStream.readManageable(); boolean identical = foo.isIdentical(bar); boolean equal = foo.equals(bar); the boolean identical is false and the boolean equal is true.

This method should support the following types:

Parameters:
value - a Managed to write.
relativeTo - determines which BaseCollection will be used to resolve the object. The relativeTo for writeManaged() and readManaged() should be the same.
Throws: EDStreamFormatError
is raised when the OutputEDStream expects something other than a Managed object of the type passed in.

All Packages  Class Hierarchy  This Package  Previous  Next  Index