Class PngChunkText
- java.lang.Object
-
- org.apache.commons.imaging.common.BinaryFileParser
-
- org.apache.commons.imaging.formats.png.chunks.PngChunk
-
- org.apache.commons.imaging.formats.png.chunks.AbstractPngTextChunk
-
- org.apache.commons.imaging.formats.png.chunks.PngChunkText
-
public final class PngChunkText extends AbstractPngTextChunk
-
-
Constructor Summary
Constructors Constructor Description PngChunkText(int length, int chunkType, int crc, byte[] bytes)Constructs a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AbstractPngTextgetContents()java.lang.StringgetKeyword()java.lang.StringgetText()-
Methods inherited from class org.apache.commons.imaging.formats.png.chunks.PngChunk
getBytes, getChunkType, getCrc, getDataStream, getLength, getPropertyBits, isAncillary, isPrivate, isReserved, isSafeToCopy
-
Methods inherited from class org.apache.commons.imaging.common.BinaryFileParser
debugNumber, debugNumber, getByteOrder, setByteOrder
-
-
-
-
Constructor Detail
-
PngChunkText
public PngChunkText(int length, int chunkType, int crc, byte[] bytes) throws ImagingExceptionConstructs a new instance.- Parameters:
length- chunk length.chunkType- chunk type.crc- CRC computed over the chunk type and chunk data (but not the length).bytes- chunk data bytes.- Throws:
ImagingException- Thrown on a parsing error.java.lang.NullPointerException- ifbytesis null.
-
-
Method Detail
-
getContents
public AbstractPngText getContents()
- Specified by:
getContentsin classAbstractPngTextChunk
-
getKeyword
public java.lang.String getKeyword()
- Specified by:
getKeywordin classAbstractPngTextChunk- Returns:
- the keyword.
-
getText
public java.lang.String getText()
- Specified by:
getTextin classAbstractPngTextChunk- Returns:
- the text.
-
-