public class AutoReadingSource extends Object implements Source
ThreadAheadReadable doing both the
reading and parsing one BufferedCharSeeker is used over a stream of chunks, where the next
chunk seamlessly transitions into the next, this class comes in handy. It uses a CharReadable
and SectionedCharBuffer to do this.Source.ChunkEMPTY_CHUNK| Constructor and Description |
|---|
AutoReadingSource(CharReadable reader,
int bufferSize) |
AutoReadingSource(CharReadable reader,
SectionedCharBuffer charBuffer) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
Source.Chunk |
nextChunk(int seekStartPos) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsingleChunkpublic AutoReadingSource(CharReadable reader, int bufferSize)
public AutoReadingSource(CharReadable reader, SectionedCharBuffer charBuffer)
public Source.Chunk nextChunk(int seekStartPos) throws IOException
nextChunk in interface SourceIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2016–2021 MWARE SOLUTIONS. All rights reserved.