public abstract class CharReadableChunker extends Object implements Chunker
CharReadable.| Modifier and Type | Class and Description |
|---|---|
static class |
CharReadableChunker.ChunkImpl |
| Modifier and Type | Field and Description |
|---|---|
protected int |
chunkSize |
protected long |
position |
protected CharReadable |
reader |
| Constructor and Description |
|---|
CharReadableChunker(CharReadable reader,
int chunkSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected int |
fillFromBackBuffer(char[] into) |
CharReadableChunker.ChunkImpl |
newChunk() |
long |
position() |
protected int |
storeInBackBuffer(char[] data,
int offset,
int length) |
protected final CharReadable reader
protected final int chunkSize
protected volatile long position
public CharReadableChunker(CharReadable reader, int chunkSize)
public CharReadableChunker.ChunkImpl newChunk()
newChunk in interface ChunkerSource.Chunk which is to be later passed into #nextChunk(Chunk)
to fill it with data. When a Source.Chunk has been fully processed then it can be passed into
#nextChunk(Chunk) again to get more data.public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic long position()
protected int fillFromBackBuffer(char[] into)
protected int storeInBackBuffer(char[] data,
int offset,
int length)
Copyright © 2016–2021 MWARE SOLUTIONS. All rights reserved.