Modifier and Type | Field and Description |
---|---|
protected DataInputStream |
_dstream
The invoking module's input stream
|
protected PngModule |
_module
The invoking module
|
protected NisoImageMetadata |
_nisoMetadata |
protected List<Property> |
_propList |
protected boolean |
ancillary |
protected static int |
bKGD_HEAD_SIG |
protected static int |
cHRM_HEAD_SIG |
protected char[] |
chunkData |
protected int |
chunkType |
protected CRC32 |
crc |
protected boolean |
duplicateAllowed |
protected static int |
gAMA_HEAD_SIG |
protected static int |
hIST_HEAD_SIG |
protected static int |
iCCP_HEAD_SIG |
protected static int |
IDAT_HEAD_SIG |
protected static int |
IEND_HEAD_SIG |
protected static int |
IHDR_HEAD_SIG |
protected static int |
iTXt_HEAD_SIG |
protected long |
length |
protected static int |
pHYs_HEAD_SIG |
protected static int |
PLTE_HEAD_SIG |
protected static int |
sBIT_HEAD_SIG |
protected static int |
sPLT_HEAD_SIG |
protected static int |
sRGB_HEAD_SIG |
protected static int |
tEXt_HEAD_SIG |
protected static int |
tIME_HEAD_SIG |
protected static int |
tRNS_HEAD_SIG |
protected static int |
zTXt_HEAD_SIG |
Constructor and Description |
---|
PNGChunk() |
Modifier and Type | Method and Description |
---|---|
String |
chunkTypeString() |
char[] |
getChunkData() |
int |
getChunkType() |
long |
getCRC() |
long |
getLength() |
static PNGChunk |
makePNGChunk(long length,
int sig)
Construct a PNGChunk object of the appropriate subtype
based on the chunk type.
|
void |
processChunk(RepInfo info)
Process a chunk.
|
void |
processChunkCommon(RepInfo info)
Common code to call at the start of every processChunk method.
|
long |
readCRC()
Read the CRC itself.
|
int |
readUnsignedByte()
Read a single byte and update the CRC
|
long |
readUnsignedInt()
Read a 4-byte unsigned integer and update the CRC
|
int |
readUnsignedShort()
Read a 2-byte unsigned integer and update the CRC
|
void |
setInputStream(DataInputStream dstrm)
Give the chunk a reference to the data stream.
|
void |
setModule(PngModule mdl)
Give the chunk a reference to the PNG module.
|
void |
setNisoMetadata(NisoImageMetadata nmd)
Hand the chunk the NISO metadata object if it needs to
put information into it.
|
void |
setPropertyList(List<Property> lst)
Hand the main property list to the chunk
|
void |
skipBytes(int count)
Skip over all the bytes, updating the CRC
|
protected long length
protected int chunkType
protected char[] chunkData
protected CRC32 crc
protected boolean ancillary
protected boolean duplicateAllowed
protected NisoImageMetadata _nisoMetadata
protected PngModule _module
protected DataInputStream _dstream
protected static final int IHDR_HEAD_SIG
protected static final int PLTE_HEAD_SIG
protected static final int IDAT_HEAD_SIG
protected static final int IEND_HEAD_SIG
protected static final int cHRM_HEAD_SIG
protected static final int gAMA_HEAD_SIG
protected static final int iCCP_HEAD_SIG
protected static final int sBIT_HEAD_SIG
protected static final int sRGB_HEAD_SIG
protected static final int tEXt_HEAD_SIG
protected static final int zTXt_HEAD_SIG
protected static final int iTXt_HEAD_SIG
protected static final int bKGD_HEAD_SIG
protected static final int hIST_HEAD_SIG
protected static final int pHYs_HEAD_SIG
protected static final int sPLT_HEAD_SIG
protected static final int tIME_HEAD_SIG
protected static final int tRNS_HEAD_SIG
public static PNGChunk makePNGChunk(long length, int sig)
public void setNisoMetadata(NisoImageMetadata nmd)
public void setPropertyList(List<Property> lst)
public void setModule(PngModule mdl)
public void setInputStream(DataInputStream dstrm)
public long getLength()
public int getChunkType()
public char[] getChunkData()
public long getCRC()
public void processChunk(RepInfo info) throws Exception
Exception
public void processChunkCommon(RepInfo info) throws PNGException
PNGException
public long readUnsignedInt() throws IOException
IOException
public int readUnsignedShort() throws IOException
IOException
public int readUnsignedByte() throws IOException
IOException
public void skipBytes(int count) throws IOException
IOException
public long readCRC() throws IOException
IOException
public String chunkTypeString()
Copyright © 2008–2017 The Open Preservation Foundation. All rights reserved.