public class PNGChunk
extends java.lang.Object
Modifier and Type | Class | Description |
---|---|---|
static class |
PNGChunk.ChunkType |
See http://en.wikipedia.org/wiki/Portable_Network_Graphics for a light explanation;
See http://www.libpng.org/pub/png/spec/1.2/PNG-Chunks.html for the spec.
|
Modifier and Type | Field | Description |
---|---|---|
protected static org.apache.commons.logging.Log |
log |
logger
|
Constructor | Description |
---|---|
PNGChunk(int length,
int type,
byte[] data,
int crc) |
Modifier and Type | Method | Description |
---|---|---|
byte |
getByte(int offset) |
|
static java.lang.String |
getChunkType(java.io.DataInputStream distream) |
Returns the PNG chunk type, a four letter case sensitive ASCII type/name.
|
byte[] |
getData() |
|
int |
getInt1(int offset) |
|
int |
getInt2(int offset) |
|
int |
getInt4(int offset) |
|
int |
getLength() |
|
java.lang.String |
getString4(int offset) |
|
int |
getType() |
|
java.lang.String |
getTypeString() |
|
boolean |
isType(java.lang.String typeName) |
|
static PNGChunk |
readChunk(java.io.DataInputStream distream) |
Reads the next chunk from the input stream.
|
static boolean |
skipChunk(java.io.DataInputStream distream) |
Skips the next chunk from the input stream.
|
public int getLength()
public int getType()
public java.lang.String getTypeString()
public byte[] getData()
public byte getByte(int offset)
public int getInt1(int offset)
public int getInt2(int offset)
public int getInt4(int offset)
public java.lang.String getString4(int offset)
public boolean isType(java.lang.String typeName)
public static PNGChunk readChunk(java.io.DataInputStream distream)
distream
- the input streampublic static java.lang.String getChunkType(java.io.DataInputStream distream)
distream
- the input streampublic static boolean skipChunk(java.io.DataInputStream distream)
distream
- the input streamCopyright 1999-2016 The Apache Software Foundation. All Rights Reserved.