public class CharSequenceInputStream extends InputStream
InputStream implementation that can read from String, StringBuffer,
StringBuilder or CharBuffer.
| 构造器和说明 |
|---|
CharSequenceInputStream(CharSequence cs,
Charset charset)
Constructor, calls
CharSequenceInputStream(CharSequence, Charset, int)
with a buffer size of 2048. |
CharSequenceInputStream(CharSequence cs,
Charset charset,
int bufferSize)
Constructor.
|
CharSequenceInputStream(CharSequence cs,
String charset)
Constructor, calls
CharSequenceInputStream(CharSequence, String, int)
with a buffer size of 2048. |
CharSequenceInputStream(CharSequence cs,
String charset,
int bufferSize)
Constructor, calls
CharSequenceInputStream(CharSequence, Charset, int). |
public CharSequenceInputStream(CharSequence cs, Charset charset, int bufferSize)
cs - the input character sequencecharset - the character set name to usebufferSize - the buffer size to use.IllegalArgumentException - if the buffer is not large enough to hold a complete characterpublic CharSequenceInputStream(CharSequence cs, String charset, int bufferSize)
CharSequenceInputStream(CharSequence, Charset, int).cs - the input character sequencecharset - the character set name to usebufferSize - the buffer size to use.IllegalArgumentException - if the buffer is not large enough to hold a complete characterpublic CharSequenceInputStream(CharSequence cs, Charset charset)
CharSequenceInputStream(CharSequence, Charset, int)
with a buffer size of 2048.cs - the input character sequencecharset - the character set name to useIllegalArgumentException - if the buffer is not large enough to hold a complete characterpublic CharSequenceInputStream(CharSequence cs, String charset)
CharSequenceInputStream(CharSequence, String, int)
with a buffer size of 2048.cs - the input character sequencecharset - the character set name to useIllegalArgumentException - if the buffer is not large enough to hold a complete characterpublic int read(byte[] b,
int off,
int len)
throws IOException
read 在类中 InputStreamIOExceptionpublic int read()
throws IOException
read 在类中 InputStreamIOExceptionpublic int read(byte[] b)
throws IOException
read 在类中 InputStreamIOExceptionpublic long skip(long n)
throws IOException
skip 在类中 InputStreamIOExceptionpublic int available()
throws IOException
available 在类中 InputStreamIOException - if an error occurs (probably not possible)public void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableclose 在类中 InputStreamIOExceptionpublic void mark(int readlimit)
mark 在类中 InputStreamreadlimit - max read limit (ignored)public void reset()
throws IOException
reset 在类中 InputStreamIOExceptionpublic boolean markSupported()
markSupported 在类中 InputStream