*/
public ChunkReader(int clen, String id, long offsetInPng, ChunkReaderMode mode) {
if (mode == null || id.length() != 4 || clen < 0)
throw new PngjExceptionInternal("Bad chunk paramenters: " + mode);
this.mode = mode;
chunkRaw = new ChunkRaw(clen, id, mode == ChunkReaderMode.BUFFER);
chunkRaw.setOffset(offsetInPng);
this.crcCheck = mode == ChunkReaderMode.SKIP ? false : true; // can be changed with setter
}