Class PngChunkItxt
- 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.PngChunkItxt
-
public final class PngChunkItxt extends AbstractPngTextChunk
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Stringkeywordprivate java.lang.StringlanguageTagThe language tag defined in [RFC-3066] indicates the human language used by the translated keyword and the text.private java.lang.Stringtextprivate java.lang.StringtranslatedKeyword
-
Constructor Summary
Constructors Constructor Description PngChunkItxt(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()java.lang.StringgetTranslatedKeyword()-
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
-
-
-
-
Field Detail
-
keyword
private final java.lang.String keyword
-
text
private final java.lang.String text
-
languageTag
private final java.lang.String languageTag
The language tag defined in [RFC-3066] indicates the human language used by the translated keyword and the text. Unlike the keyword, the language tag is case-insensitive. It is an ISO 646.IRV:1991 [ISO 646] string consisting of hyphen-separated words of 1-8 alphanumeric characters each (for example cn, en-uk, no-bok, x-klingon, x-KlInGoN). If the first word is two or three letters long, it is an ISO language code [ISO-639]. If the language tag is empty, the language is unspecified.
-
translatedKeyword
private final java.lang.String translatedKeyword
-
-
Constructor Detail
-
PngChunkItxt
public PngChunkItxt(int length, int chunkType, int crc, byte[] bytes) throws ImagingException, java.io.IOExceptionConstructs 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.io.IOException- Thrown on reading 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:
- Gets the keyword.
-
getText
public java.lang.String getText()
- Specified by:
getTextin classAbstractPngTextChunk- Returns:
- Gets the text.
-
getTranslatedKeyword
public java.lang.String getTranslatedKeyword()
-
-