public class ProgressiveBufferedReadableCharStream extends ConcurrentCloseable<IOException> implements ICharacterStream.Readable.Buffered
ICharacterStream.Readable.Buffered, ICharacterStream.Readable.PositionInTextICharacterStream.Readable, ICharacterStream.Writable, ICharacterStream.WriterAsyncCloseableListenable.Impl| Constructor and Description |
|---|
ProgressiveBufferedReadableCharStream(Decoder decoder,
int bufferSize,
int maxBuffers)
Constructor.
|
ProgressiveBufferedReadableCharStream(Decoder decoder,
int bufferSize,
int maxBuffers,
CharBuffer firstChars)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
back(char c)
Put back one character.
|
IAsync<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 offset,
int length)
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 ProgressiveBufferedReadableCharStream(Decoder decoder, int bufferSize, int maxBuffers)
public ProgressiveBufferedReadableCharStream(Decoder decoder, int bufferSize, int maxBuffers, CharBuffer firstChars)
public 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 IAsync<IOException> canStartReading()
ICharacterStream.Readable.BufferedcanStartReading in interface ICharacterStream.Readable.Bufferedpublic int readAsync()
throws IOException
ICharacterStream.Readable.BufferedreadAsync in interface ICharacterStream.Readable.BufferedIOExceptionpublic AsyncSupplier<Integer,IOException> readAsync(char[] buf, int offset, int length)
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 boolean readUntil(char endChar,
UnprotectedStringBuffer string)
throws IOException
ICharacterStream.Readable.BufferedreadUntil in interface ICharacterStream.Readable.BufferedIOExceptionpublic AsyncSupplier<Boolean,IOException> readUntilAsync(char endChar, UnprotectedStringBuffer string)
ICharacterStream.Readable.BufferedreadUntilAsync in interface ICharacterStream.Readable.Bufferedpublic boolean endReached()
ICharacterStream.ReadableendReached in interface ICharacterStream.Readablepublic 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 String getDescription()
ICharacterStreamgetDescription in interface ICharacterStreamprotected IAsync<IOException> closeUnderlyingResources()
closeUnderlyingResources in class ConcurrentCloseable<IOException>protected void closeResources(Async<IOException> ondone)
closeResources in class ConcurrentCloseable<IOException>Copyright © 2019. All rights reserved.