All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object
|
+----java.io.InputStream
|
+----java.io.StringBufferInputStream
StringReader class.
This class allows an application to create an input stream in
which the bytes read are supplied by the contents of a string.
Applications can also read bytes from a byte array by using a
ByteArrayInputStream.
Only the low eight bits of each character in the string are used by this class.
len bytes of data from this input stream
into an array of bytes.
n bytes of input from this input stream.
Properties Inheritable
buffer=String
Properties Inheritable pos=int
Properties Inheritable count=int
method StringBufferInputStream(s=String) public
method read() returns int public protect
int in the range
0 to 255. If no byte is available
because the end of the stream has been reached, the value
-1 is returned.
The read method of
StringBufferInputStream cannot block. It returns the
low eight bits of the next character in this input stream's buffer.
-1 if the end of the
stream is reached.
method read(b=byte[], -
off=int, -
len=int) returns int public protect
len bytes of data from this input stream
into an array of bytes.
The read method of
StringBufferInputStream cannot block. It copies the
low eight bits from the characters in this input stream's buffer into
the byte array argument.
-1 if there is no more data because the end of
the stream has been reached.
method skip(n=long) returns long public protect
n bytes of input from this input stream. Fewer
bytes might be skipped if the end of the input stream is reached.
method available() returns int public protect
count - pos, which is the
number of bytes remaining to be read from the input buffer.
method reset() public protect
All Packages Class Hierarchy This Package Previous Next Index