Build 1.0_r1(from source)

java.io
Class StringBufferInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.StringBufferInputStream
All Implemented Interfaces:
Closeable

Deprecated. Use StringReader

@Deprecated
public class StringBufferInputStream
extends InputStream

StringBufferInputStream is a class for to allow a String to be used as an InputStream.


Field Summary
protected  String buffer
          Deprecated. The String containing the data to read.
protected  int count
          Deprecated. The total number of characters inside the buffer.
protected  int pos
          Deprecated. The current position within the String buffer.
 
Constructor Summary
StringBufferInputStream(String str)
          Deprecated. Constructs a new StringBufferInputStream on the String str.
 
Method Summary
 int available()
          Deprecated. Returns an int representing then number of characters that are available to read.
 int read()
          Deprecated. Reads a single byte from this InputStream and returns the result as an int.
 int read(byte[] b, int offset, int length)
          Deprecated. Reads at most length bytes from this InputStream and stores them in byte array b starting at offset.
 void reset()
          Deprecated. Reset this InputStream to position 0.
 long skip(long n)
          Deprecated. Skips count number of characters in this InputStream.
 
Methods inherited from class java.io.InputStream
close, mark, markSupported, read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buffer

protected String buffer
Deprecated. 
The String containing the data to read.


count

protected int count
Deprecated. 
The total number of characters inside the buffer.


pos

protected int pos
Deprecated. 
The current position within the String buffer.

Constructor Detail

StringBufferInputStream

public StringBufferInputStream(String str)
Deprecated. 
Constructs a new StringBufferInputStream on the String str.

Parameters:
str - the String to read characters from.
Method Detail

available

public int available()
Deprecated. 
Returns an int representing then number of characters that are available to read.

Overrides:
available in class InputStream
Returns:
the number of characters available.

read

public int read()
Deprecated. 
Reads a single byte from this InputStream and returns the result as an int. The low-order byte is returned or -1 of the end of stream was encountered.

Specified by:
read in class InputStream
Returns:
the byte read or -1 if end of stream.

read

public int read(byte[] b,
                int offset,
                int length)
Deprecated. 
Reads at most length bytes from this InputStream and stores them in byte array b starting at offset. Answer the number of bytes actually read or -1 if no bytes were read and end of stream was encountered.

Overrides:
read in class InputStream
Parameters:
b - the byte array in which to store the read bytes.
offset - the offset in b to store the read bytes.
length - the maximum number of bytes to store in b.
Returns:
the number of bytes actually read or -1 if end of stream.

reset

public void reset()
Deprecated. 
Reset this InputStream to position 0. Reads/Skips will now take place from this position.

Overrides:
reset in class InputStream

skip

public long skip(long n)
Deprecated. 
Skips count number of characters in this InputStream. Subsequent read()'s will not return these characters unless reset() is used.

Overrides:
skip in class InputStream
Parameters:
n - the number of characters to skip.
Returns:
the number of characters actually skipped.

Build 1.0_r1(from source)

Please submit a feedback, bug or feature