| ★ wanayoo — archive 1999 http://developer.android.com/reference/java/io/StringBufferInputStream.html | Nouvelle recherche | Portail wanayoo |
| java.lang.Object | ||
| ↳ | java.io.InputStream | |
| ↳ | java.io.StringBufferInputStream | |
This class is deprecated.Use StringReader
StringBufferInputStream is a class for to allow a String to be used as an InputStream.
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| buffer | The String containing the data to read. | ||||||||||
| count | The total number of characters inside the buffer. | ||||||||||
| pos | The current position within the String buffer. | ||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new StringBufferInputStream on the String
str. | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Returns an int representing then number of characters that are available
to read.
| |||||||||||
Reads at most
length bytes from this InputStream and
stores them in byte array b starting at
offset. | |||||||||||
Reads a single byte from this InputStream and returns the result as an
int.
| |||||||||||
Reset this InputStream to position 0.
| |||||||||||
Skips
count number of characters in this InputStream. | |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class java.io.InputStream
| |||||||||||
From class java.lang.Object
| |||||||||||
From interface java.io.Closeable
| |||||||||||
The String containing the data to read.
The total number of characters inside the buffer.
The current position within the String buffer.
Constructs a new StringBufferInputStream on the String str.
| str | the String to read characters from. |
|---|
Returns an int representing then number of characters that are available to read.
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.
| 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. |
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.
Reset this InputStream to position 0. Reads/Skips will now take place from this position.
Skips count number of characters in this InputStream.
Subsequent read()'s will not return these characters
unless reset() is used.
| n | the number of characters to skip. |
|---|