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

Class COM.ibm.jaws.motk.ArrayEDStream

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

public class ArrayEDStream
extends ObjectEDStreamBase
This class implements a stream with an array as its underlying storage.

Constructor Index

 o ArrayEDStream(int)
Creates a new stream with the indicated capacity.
 o ArrayEDStream(Object[])
Creates a new stream with the indicated contents.

Method Index

 o atEnd()
 o close()
Releases all the resources associated with this stream.
 o hasMoreRoom()
Returns true if there is more room to write in to.
 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)

Constructors

 o ArrayEDStream
  public ArrayEDStream(Object buf[])
Creates a new stream with the indicated contents. This is like creating an empty ArrayEDStream of size buf.length and then writing into it buf.length times. Any attempt to write into the created stream without reseting it first will raise an EDStreamFormatError.
Parameters:
buf - the initial contents of the stream. Buf is not copied it is just keep, so it should not be used after it is passed in.
 o ArrayEDStream
  public ArrayEDStream(int size)
Creates a new stream with the indicated capacity. The stream is empty and any attempt to read from it without first writing something into will raise an exception.

Methods

 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.
 o hasMoreRoom
  public boolean hasMoreRoom()
Returns true if there is more room to write in to.

All Packages  Class Hierarchy  This Package  Previous  Next  Index