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.
-
buf
-
-
readPosition
-
-
writePosition
-
-
VectorEDStream()
- Creates a new stream with the default initial capacity.
-
VectorEDStream(int)
- Creates a new stream with the indicated initial capacity.
-
VectorEDStream(Object[])
- Creates a new stream with the indicated contents.
-
VectorEDStream(Vector)
- Creates a new stream with the indicated contents.
-
atEnd()
-
-
close()
- Releases all the resources associated with this stream.
-
elements()
- Returns a java.util.Enumeration of all the elements in the
vector.
-
readEnd()
-
-
readObject()
-
-
reset(boolean)
- Completely resets this stream.
-
resetRead()
- Resets the read position only in this stream.
-
writeEnd()
-
-
writeObject(Object)
-
readPosition
protected int readPosition
writePosition
protected int writePosition
buf
protected Vector buf
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.
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.
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.
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.
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.
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
readObject
public Object readObject()
- Overrides:
- readObject in class ObjectEDStreamBase
atEnd
public boolean atEnd()
- Overrides:
- atEnd in class ObjectEDStreamBase
readEnd
public void readEnd()
- Overrides:
- readEnd in class ObjectEDStreamBase
writeEnd
public void writeEnd()
- Overrides:
- writeEnd in class ObjectEDStreamBase
writeObject
public void writeObject(Object value)
- Overrides:
- writeObject in class ObjectEDStreamBase
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.
resetRead
public void resetRead()
- Resets the read position only in this stream.
All Packages Class Hierarchy This Package Previous Next Index