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, startNewChunk
public 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)
ChunkSeqReader
ChunkSeqReader.postProcessChunk(ChunkReader)
(always) when done.createChunkReaderForNewChunk
in class ChunkSeqReader
id
- 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)
ChunkSeqReader
postProcessChunk
in class ChunkSeqReader
protected boolean shouldSkipContent(int len, String id)
ChunkSeqReader
shouldSkipContent
in class ChunkSeqReader
protected boolean isIdatKind(String id)
ChunkSeqReader
isIdatKind
in class ChunkSeqReader
Copyright © 2014. All rights reserved.