|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.InputStream org.apache.commons.io.input.CharSequenceInputStream
public class CharSequenceInputStream
InputStream
implementation that can read from String, StringBuffer,
StringBuilder or CharBuffer.
Note: Supports mark(int)
and reset()
.
Constructor Summary | |
---|---|
CharSequenceInputStream(CharSequence s,
Charset charset)
Constructor, calls CharSequenceInputStream(CharSequence, Charset, int)
with a buffer size of 2048. |
|
CharSequenceInputStream(CharSequence s,
Charset charset,
int bufferSize)
Constructor. |
|
CharSequenceInputStream(CharSequence s,
String charset)
Constructor, calls CharSequenceInputStream(CharSequence, String, int)
with a buffer size of 2048. |
|
CharSequenceInputStream(CharSequence s,
String charset,
int bufferSize)
Constructor, calls CharSequenceInputStream(CharSequence, Charset, int) . |
Method Summary | |
---|---|
int |
available()
|
void |
close()
|
void |
mark(int readlimit)
|
boolean |
markSupported()
|
int |
read()
|
int |
read(byte[] b)
|
int |
read(byte[] b,
int off,
int len)
|
void |
reset()
|
long |
skip(long n)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CharSequenceInputStream(CharSequence s, Charset charset, int bufferSize)
s
- the input character sequencecharset
- the character set name to usebufferSize
- the buffer size to use.public CharSequenceInputStream(CharSequence s, String charset, int bufferSize)
CharSequenceInputStream(CharSequence, Charset, int)
.
s
- the input character sequencecharset
- the character set name to usebufferSize
- the buffer size to use.public CharSequenceInputStream(CharSequence s, Charset charset)
CharSequenceInputStream(CharSequence, Charset, int)
with a buffer size of 2048.
s
- the input character sequencecharset
- the character set name to usepublic CharSequenceInputStream(CharSequence s, String charset)
CharSequenceInputStream(CharSequence, String, int)
with a buffer size of 2048.
s
- the input character sequencecharset
- the character set name to useMethod Detail |
---|
public int read(byte[] b, int off, int len) throws IOException
read
in class InputStream
IOException
public int read() throws IOException
read
in class InputStream
IOException
public int read(byte[] b) throws IOException
read
in class InputStream
IOException
public long skip(long n) throws IOException
skip
in class InputStream
IOException
public int available() throws IOException
available
in class InputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in class InputStream
IOException
public void mark(int readlimit)
mark
in class InputStream
readlimit
- max read limit (ignored)public void reset() throws IOException
reset
in class InputStream
IOException
public boolean markSupported()
markSupported
in class InputStream
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |