java.lang.Object
java.io.InputStream
java.io.StringBufferInputStream
- All Implemented Interfaces:
- Closeable
- See Also:
- Top Examples, Source Code, @Deprecated,
ByteArrayInputStream
,
StringReader
public int available()
- See Also:
- InputStream
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
protected String buffer
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
protected int count
- See Also:
buffer
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
protected int pos
- See Also:
buffer
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public int read()
- See Also:
- InputStream
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public int read(byte[] b,
int off,
int len)
- See Also:
InputStream.read()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void reset()
- See Also:
IOException
, InputStream.mark(int)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public long skip(long n)
- See Also:
- InputStream
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public StringBufferInputStream(String s)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
[1973]Convert String to InputStream
By Anonymous on 2008/07/22 12:20:39 Rate
By reading the API documentation you could have found:
( a ) The deprecated StringBufferInputStream.
Deprecated because it is not a good idea to read the characters in a string as bytes with unspecified encoding.
( b ) ByteArrayInputStream ( theString.getBytes ( ) )
Using the platforms encoding.
( c ) ByteArrayInputStream ( theString.getBytes ( "encodingName" ) )
Using the specified encoding, such as "UTF-8"