| Modifier and Type | Field | Description |
|---|---|---|
private java.nio.ByteBuffer |
bbuf |
|
private java.nio.CharBuffer |
cbuf |
|
private java.nio.charset.CharsetEncoder |
encoder |
|
private int |
mark |
| Constructor | Description |
|---|---|
CharSequenceInputStream(java.lang.CharSequence s,
java.lang.String charset) |
Constructor, calls
CharSequenceInputStream(CharSequence, String, int)
with a buffer size of 2048. |
CharSequenceInputStream(java.lang.CharSequence s,
java.lang.String charset,
int bufferSize) |
Constructor, calls
CharSequenceInputStream(CharSequence, Charset, int). |
CharSequenceInputStream(java.lang.CharSequence s,
java.nio.charset.Charset charset) |
Constructor, calls
CharSequenceInputStream(CharSequence, Charset, int)
with a buffer size of 2048. |
CharSequenceInputStream(java.lang.CharSequence s,
java.nio.charset.Charset charset,
int bufferSize) |
Constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
available() |
|
void |
close() |
|
private void |
fillBuffer() |
Fills the byte output buffer from the input char buffer.
|
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) |
private final java.nio.charset.CharsetEncoder encoder
private final java.nio.CharBuffer cbuf
private final java.nio.ByteBuffer bbuf
private int mark
public CharSequenceInputStream(java.lang.CharSequence s,
java.nio.charset.Charset charset,
int bufferSize)
s - the input character sequencecharset - the character set name to usebufferSize - the buffer size to use.public CharSequenceInputStream(java.lang.CharSequence s,
java.lang.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(java.lang.CharSequence s,
java.nio.charset.Charset charset)
CharSequenceInputStream(CharSequence, Charset, int)
with a buffer size of 2048.s - the input character sequencecharset - the character set name to usepublic CharSequenceInputStream(java.lang.CharSequence s,
java.lang.String charset)
CharSequenceInputStream(CharSequence, String, int)
with a buffer size of 2048.s - the input character sequencecharset - the character set name to useprivate void fillBuffer()
throws java.nio.charset.CharacterCodingException
java.nio.charset.CharacterCodingException - an error encoding datapublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] b)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic long skip(long n)
throws java.io.IOException
skip in class java.io.InputStreamjava.io.IOExceptionpublic int available()
throws java.io.IOException
available in class java.io.InputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.lang.AutoCloseableclose in interface java.io.Closeableclose in class java.io.InputStreamjava.io.IOExceptionpublic void mark(int readlimit)
mark in class java.io.InputStreamreadlimit - max read limit (ignored)public void reset()
throws java.io.IOException
reset in class java.io.InputStreamjava.io.IOExceptionpublic boolean markSupported()
markSupported in class java.io.InputStreamCopyright (c) 2002-2017 Apache Software Foundation