public class BufferedReadableCharacterStream extends ConcurrentCloseable<IOException> implements ICharacterStream.Readable.Buffered
ICharacterStream.Readable.Buffered, ICharacterStream.Readable.PositionInTextICharacterStream.Readable, ICharacterStream.Writable, ICharacterStream.WriterAsyncCloseableListenable.Impl| Constructor and Description |
|---|
BufferedReadableCharacterStream(IO.Readable input,
CharsetDecoder decoder,
int bufferSize,
int maxBuffers)
Constructor.
|
BufferedReadableCharacterStream(IO.Readable input,
CharsetDecoder decoder,
int bufferSize,
int maxBuffers,
ByteBuffer initBytes,
CharBuffer initChars)
Constructor.
|
BufferedReadableCharacterStream(IO.Readable input,
Charset charset,
int bufferSize,
int maxBuffers)
Constructor.
|
BufferedReadableCharacterStream(IO.Readable input,
Charset charset,
int bufferSize,
int maxBuffers,
ByteBuffer initBytes,
CharBuffer initChars)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
back(char c)
Put back one character.
|
Async<IOException> |
canStartReading()
Return a synchronization point which is unblocked once some characters have been buffered.
|
protected void |
closeResources(Async<IOException> ondone) |
protected IAsync<IOException> |
closeUnderlyingResources() |
boolean |
endReached()
Return true if the end of the stream has been reached, and no more character can be read.
|
String |
getDescription()
Description.
|
Charset |
getEncoding()
Return the encoding of the stream.
|
byte |
getPriority()
Return the priority.
|
char |
read()
Read one character.
|
int |
readAsync()
Read one character if possible.
|
AsyncSupplier<Integer,IOException> |
readAsync(char[] buf,
int off,
int len)
Read characters.
|
UnprotectedString |
readNextBuffer()
Return the next buffer, or null if the end of stream has been reached.
|
AsyncSupplier<UnprotectedString,IOException> |
readNextBufferAsync()
Return the next buffer as soon as available, or null if then end of stream has been reached.
|
int |
readSync(char[] buf,
int offset,
int length)
Read characters.
|
boolean |
readUntil(char endChar,
UnprotectedStringBuffer string)
Read characters until the given end, and put them in the given string.
|
AsyncSupplier<Boolean,IOException> |
readUntilAsync(char endChar,
UnprotectedStringBuffer string)
Read characters until the given end, and put them in the given string.
|
void |
setPriority(byte priority)
Change the priority (see Task priorities).
|
addCloseListener, addCloseListener, close, closeAsync, isClosed, isClosing, lockClose, operation, operation, removeCloseListener, removeCloseListener, unlockCloseclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreadFullyAsync, readFullySynclockClose, unlockCloseclosecloseAfter, closeAsyncaddCloseListener, addCloseListener, close, isClosed, removeCloseListener, removeCloseListenerpublic BufferedReadableCharacterStream(IO.Readable input, Charset charset, int bufferSize, int maxBuffers)
public BufferedReadableCharacterStream(IO.Readable input, CharsetDecoder decoder, int bufferSize, int maxBuffers)
public BufferedReadableCharacterStream(IO.Readable input, Charset charset, int bufferSize, int maxBuffers, ByteBuffer initBytes, CharBuffer initChars)
public BufferedReadableCharacterStream(IO.Readable input, CharsetDecoder decoder, int bufferSize, int maxBuffers, ByteBuffer initBytes, CharBuffer initChars)
public Async<IOException> canStartReading()
ICharacterStream.Readable.BufferedcanStartReading in interface ICharacterStream.Readable.Bufferedprotected IAsync<IOException> closeUnderlyingResources()
closeUnderlyingResources in class ConcurrentCloseable<IOException>protected void closeResources(Async<IOException> ondone)
closeResources in class ConcurrentCloseable<IOException>public String getDescription()
ICharacterStreamgetDescription in interface ICharacterStreampublic Charset getEncoding()
ICharacterStreamgetEncoding in interface ICharacterStreampublic byte getPriority()
ConcurrentCloseablegetPriority in interface ICharacterStreamgetPriority in class ConcurrentCloseable<IOException>public void setPriority(byte priority)
ICharacterStreamsetPriority in interface ICharacterStreampublic boolean endReached()
ICharacterStream.ReadableendReached in interface ICharacterStream.Readablepublic void back(char c)
ICharacterStream.Readable.Bufferedback in interface ICharacterStream.Readable.Bufferedpublic char read()
throws IOException
ICharacterStream.Readable.Bufferedread in interface ICharacterStream.Readable.BufferedIOExceptionpublic int readSync(char[] buf,
int offset,
int length)
throws IOException
ICharacterStream.ReadablereadSync in interface ICharacterStream.ReadableIOExceptionpublic int readAsync()
throws IOException
ICharacterStream.Readable.BufferedreadAsync in interface ICharacterStream.Readable.BufferedIOExceptionpublic AsyncSupplier<Integer,IOException> readAsync(char[] buf, int off, int len)
ICharacterStream.ReadablereadAsync in interface ICharacterStream.Readablepublic AsyncSupplier<UnprotectedString,IOException> readNextBufferAsync()
ICharacterStream.Readable.BufferedreadNextBufferAsync in interface ICharacterStream.Readable.Bufferedpublic UnprotectedString readNextBuffer() throws IOException
ICharacterStream.Readable.BufferedreadNextBuffer in interface ICharacterStream.Readable.BufferedIOExceptionpublic AsyncSupplier<Boolean,IOException> readUntilAsync(char endChar, UnprotectedStringBuffer string)
ICharacterStream.Readable.BufferedreadUntilAsync in interface ICharacterStream.Readable.Bufferedpublic boolean readUntil(char endChar,
UnprotectedStringBuffer string)
throws IOException
ICharacterStream.Readable.BufferedreadUntil in interface ICharacterStream.Readable.BufferedIOExceptionCopyright © 2019. All rights reserved.