public class PngChunkType
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private byte[] |
_bytes |
private static java.util.Set<java.lang.String> |
_identifiersAllowingMultiples |
private boolean |
_multipleAllowed |
static PngChunkType |
bKGD |
static PngChunkType |
cHRM |
static PngChunkType |
gAMA |
static PngChunkType |
hIST |
static PngChunkType |
iCCP |
static PngChunkType |
IDAT |
static PngChunkType |
IEND |
static PngChunkType |
IHDR
Denotes a critical
PngChunk that contains basic information about the PNG image. |
static PngChunkType |
iTXt |
static PngChunkType |
pHYs |
static PngChunkType |
PLTE
Denotes a critical
PngChunk that contains palette entries. |
static PngChunkType |
sBIT |
static PngChunkType |
sPLT |
static PngChunkType |
sRGB |
static PngChunkType |
tEXt
Denotes an ancillary
PngChunk that contains textual data, having first a keyword and then a value. |
static PngChunkType |
tIME |
static PngChunkType |
tRNS |
static PngChunkType |
zTXt |
Constructor and Description |
---|
PngChunkType(byte[] bytes) |
PngChunkType(java.lang.String identifier) |
PngChunkType(java.lang.String identifier,
boolean multipleAllowed) |
Modifier and Type | Method and Description |
---|---|
boolean |
areMultipleAllowed() |
boolean |
equals(java.lang.Object o) |
java.lang.String |
getIdentifier() |
int |
hashCode() |
boolean |
isAncillary() |
boolean |
isCritical() |
private static boolean |
isLowerCase(byte b) |
boolean |
isPrivate() |
boolean |
isSafeToCopy() |
private static boolean |
isUpperCase(byte b) |
private static boolean |
isValidByte(byte b) |
java.lang.String |
toString() |
private static void |
validateBytes(byte[] bytes) |
private static final java.util.Set<java.lang.String> _identifiersAllowingMultiples
public static final PngChunkType IHDR
PngChunk
that contains basic information about the PNG image.
This must be the first chunk in the data sequence, and may only occur once.
The format is:
PngColorType
enumpublic static final PngChunkType PLTE
PngChunk
that contains palette entries.
This chunk should only appear for a PngColorType
of IndexedColor
,
and may only occur once in the PNG data sequence.
The chunk contains between one and 256 entries, each of three bytes:
public static final PngChunkType IDAT
public static final PngChunkType IEND
public static final PngChunkType cHRM
public static final PngChunkType gAMA
public static final PngChunkType iCCP
public static final PngChunkType sBIT
public static final PngChunkType sRGB
public static final PngChunkType bKGD
public static final PngChunkType hIST
public static final PngChunkType tRNS
public static final PngChunkType pHYs
public static final PngChunkType sPLT
public static final PngChunkType tIME
public static final PngChunkType iTXt
public static final PngChunkType tEXt
PngChunk
that contains textual data, having first a keyword and then a value.
If multiple text data keywords are needed, then multiple chunks are included in the PNG data stream.
The format is:
public static final PngChunkType zTXt
private final byte[] _bytes
private final boolean _multipleAllowed
public PngChunkType(java.lang.String identifier) throws PngProcessingException
PngProcessingException
public PngChunkType(java.lang.String identifier, boolean multipleAllowed) throws PngProcessingException
PngProcessingException
public PngChunkType(byte[] bytes) throws PngProcessingException
PngProcessingException
private static void validateBytes(byte[] bytes) throws PngProcessingException
PngProcessingException
public boolean isCritical()
public boolean isAncillary()
public boolean isPrivate()
public boolean isSafeToCopy()
public boolean areMultipleAllowed()
private static boolean isLowerCase(byte b)
private static boolean isUpperCase(byte b)
private static boolean isValidByte(byte b)
public java.lang.String getIdentifier()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object