Class COM.ibm.jaws.motk.VectorEDStream
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class COM.ibm.jaws.motk.VectorEDStream

java.lang.Object
   |
   +----COM.ibm.jaws.motk.ObjectEDStreamBase
           |
           +----COM.ibm.jaws.motk.VectorEDStream

public class VectorEDStream
extends ObjectEDStreamBase
This class implements a stream with a Vector as its underlying storage. The capacity of these streams is only limited by available memory.

Variable Index

 o buf
 o readPosition
 o writePosition

Constructor Index

 o VectorEDStream()
Creates a new stream with the default initial capacity.
 o VectorEDStream(int)
Creates a new stream with the indicated initial capacity.
 o VectorEDStream(Object[])
Creates a new stream with the indicated contents.
 o VectorEDStream(Vector)
Creates a new stream with the indicated contents.

Method Index

 o atEnd()
 o close()
Releases all the resources associated with this stream.
 o elements()
Returns a java.util.Enumeration of all the elements in the vector.
 o readEnd()
 o readObject()
 o reset(boolean)
Completely resets this stream.
 o resetRead()
Resets the read position only in this stream.
 o writeEnd()
 o writeObject(Object)

Variables

 o readPosition
  protected int readPosition
 o writePosition
  protected int writePosition
 o buf
  protected Vector buf

Constructors

 o VectorEDStream
  public VectorEDStream()
Creates a new stream with the default initial capacity. The stream is empty and any attempt to read from it without first writing something into it will raise an exception.
 o VectorEDStream
  public VectorEDStream(Object array[])
Creates a new stream with the indicated contents. This is like creating an empty VectorEDStream of size array.length and then writing into it array.length times. Any attempt to write into the created stream without reseting it first will raise an IOException.
Parameters:
array - the initial contents of the stream.
 o VectorEDStream
  public VectorEDStream(Vector buf)
Creates a new stream with the indicated contents. This is like creating an empty VectorEDStream of size buf.size() and then writing into it buf.size() times. Any attempt to write into the created stream without reseting it first will raise an IOException.
Parameters:
array - the initial contents of the stream.
 o VectorEDStream
  public VectorEDStream(int size)
Creates a new stream with the indicated initial capacity. The stream is empty and any attempt to read from it without first writing something into will raise an exception.

Methods

 o elements
  public Enumeration elements()
Returns a java.util.Enumeration of all the elements in the vector. If more elements are written to the stream then they may show up in the Enumeration or they may not.
 o close
  public void close()
Releases all the resources associated with this stream. All data in the stream will be lost unless it it retained elsewhere.
Overrides:
close in class ObjectEDStreamBase
 o readObject
  public Object readObject()
Overrides:
readObject in class ObjectEDStreamBase
 o atEnd
  public boolean atEnd()
Overrides:
atEnd in class ObjectEDStreamBase
 o readEnd
  public void readEnd()
Overrides:
readEnd in class ObjectEDStreamBase
 o writeEnd
  public void writeEnd()
Overrides:
writeEnd in class ObjectEDStreamBase
 o writeObject
  public void writeObject(Object value)
Overrides:
writeObject in class ObjectEDStreamBase
 o reset
  public void reset(boolean clear)
Completely resets this stream. It no longer has anything to read. Optionally, null out all the slots in the stream.
Parameters:
clear - true to have null written into all the slots of the stream.
 o resetRead
  public void resetRead()
Resets the read position only in this stream.

All Packages  Class Hierarchy  This Package  Previous  Next  Index