public class ChunkFactory extends Object implements IChunkFactory
The user that wants to parse custom chunks can extend createEmptyChunkExtended(String, ImageInfo)
Constructor and Description |
---|
ChunkFactory() |
ChunkFactory(boolean parse) |
Modifier and Type | Method and Description |
---|---|
PngChunk |
createChunk(ChunkRaw chunkRaw,
ImageInfo imgInfo) |
protected PngChunk |
createEmptyChunkExtended(String id,
ImageInfo imgInfo)
Factory for chunks that are not in the original PNG standard.
|
protected PngChunk |
createEmptyChunkKnown(String id,
ImageInfo imgInfo) |
protected PngChunk |
createEmptyChunkUnknown(String id,
ImageInfo imgInfo)
This is used as last resort factory method.
|
public ChunkFactory()
public ChunkFactory(boolean parse)
public final PngChunk createChunk(ChunkRaw chunkRaw, ImageInfo imgInfo)
createChunk
in interface IChunkFactory
chunkRaw
- Chunk in raw form. Data can be null if it was skipped or processed directly (eg IDAT)imgInfo
- Not normally necessary, but some chunks want this infoprotected final PngChunk createEmptyChunkUnknown(String id, ImageInfo imgInfo)
It creates a PngChunkUNKNOWN
chunk.
protected PngChunk createEmptyChunkExtended(String id, ImageInfo imgInfo)
id
- Chunk id , 4 lettersimgInfo
- Usually not neededCopyright © 2014. All rights reserved.