public class ChunkSeqSkipping extends ChunkSeqReader
SIGNATURE_LEN, withSignature| Constructor and Description |
|---|
ChunkSeqSkipping() |
ChunkSeqSkipping(boolean skipAll) |
| Modifier and Type | Method and Description |
|---|---|
protected ChunkReader |
createChunkReaderForNewChunk(String id,
int len,
long offset,
boolean skip)
This will be called for all chunks (even skipped), except for IDAT-like non-skiped chunks
The default behaviour is to create a ChunkReader in BUFFER mode (or SKIP if skip==true) that calls
ChunkSeqReader.postProcessChunk(ChunkReader) (always) when done. |
List<ChunkRaw> |
getChunks() |
protected boolean |
isIdatKind(String id)
Decides if this Chunk is of "IDAT" kind (in concrete: if it is, and if it's not to be skiped, a DeflatedChunksSet will be created to deflate it and process+ the deflated data)
This implementation always returns always false
|
protected void |
postProcessChunk(ChunkReader chunkR)
This is called after a chunk is read, in all modes
This implementation only chenks the id of the first chunk, and process the IEND chunk (sets done=true)
Further processing should be overriden (call this first!)
|
protected void |
processChunkContent(ChunkRaw chunkRaw,
int offsetinChhunk,
byte[] buf,
int off,
int len) |
protected boolean |
shouldSkipContent(int len,
String id)
Chunks can be skipped depending on id and/or length.
|
checkSignature, close, consume, createIdatSet, endChunkId, feedAll, feedFromFile, feedFromInputStream, feedFromInputStream, firstChunkId, getBytesCount, getChunkCount, getCurChunkReader, getCurReaderDeflatedSet, getIdatBytes, isAtChunkBoundary, isDone, isSignatureDone, shouldCheckCrc, startNewChunkpublic ChunkSeqSkipping(boolean skipAll)
skipAll - if true, contents will be truly skipped, and CRC will not be computedpublic ChunkSeqSkipping()
protected ChunkReader createChunkReaderForNewChunk(String id, int len, long offset, boolean skip)
ChunkSeqReaderChunkSeqReader.postProcessChunk(ChunkReader) (always) when done.createChunkReaderForNewChunk in class ChunkSeqReaderid - Chunk idlen - Chunk lengthoffset - offset inside PNG stream , merely informativeskip - flag: is true, the content will not be buffered (nor processed)protected void processChunkContent(ChunkRaw chunkRaw, int offsetinChhunk, byte[] buf, int off, int len)
protected void postProcessChunk(ChunkReader chunkR)
ChunkSeqReaderpostProcessChunk in class ChunkSeqReaderprotected boolean shouldSkipContent(int len,
String id)
ChunkSeqReadershouldSkipContent in class ChunkSeqReaderprotected boolean isIdatKind(String id)
ChunkSeqReaderisIdatKind in class ChunkSeqReaderCopyright © 2014. All rights reserved.