Class IptcParser
java.lang.Object
org.apache.commons.imaging.common.BinaryFileParser
org.apache.commons.imaging.formats.jpeg.iptc.IptcParser
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final ByteOrderprivate static final byte[]private static final Charsetprivate static final intprivate static final LoggerBlock types (or Image Resource IDs) that are not recommended to be interpreted when libraries process Photoshop IPTC metadata. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new instance with the default, big-endian, byte order. -
Method Summary
Modifier and TypeMethodDescriptionprivate CharsetfindCharset(byte[] codedCharset) booleanisPhotoshopJpegSegment(byte[] segmentData) parseAllBlocks(byte[] bytes, boolean strict) protected List<IptcRecord> parseIptcBlock(byte[] bytes) parsePhotoshopSegment(byte[] bytes, boolean strict) parsePhotoshopSegment(byte[] bytes, ImagingParameters<JpegImagingParameters> params) byte[]writeIptcBlock(List<IptcRecord> elements) byte[]writeIptcBlock(List<IptcRecord> elements, boolean forceUtf8Encoding) byte[]Methods inherited from class BinaryFileParser
debugNumber, debugNumber, getByteOrder, setByteOrder
-
Field Details
-
LOGGER
-
APP13_BYTE_ORDER
-
PHOTOSHOP_IGNORED_BLOCK_TYPE
-
DEFAULT_CHARSET
-
ENV_TAG_CODED_CHARACTER_SET
private static final int ENV_TAG_CODED_CHARACTER_SET- See Also:
-
CHARACTER_ESCAPE_SEQUENCE
private static final byte[] CHARACTER_ESCAPE_SEQUENCE
-
-
Constructor Details
-
IptcParser
public IptcParser()Constructs a new instance with the default, big-endian, byte order.
-
-
Method Details
-
findCharset
-
isPhotoshopJpegSegment
public boolean isPhotoshopJpegSegment(byte[] segmentData) -
parseAllBlocks
protected List<IptcBlock> parseAllBlocks(byte[] bytes, boolean strict) throws ImagingException, IOException - Throws:
ImagingExceptionIOException
-
parseIptcBlock
-
parsePhotoshopSegment
public PhotoshopApp13Data parsePhotoshopSegment(byte[] bytes, boolean strict) throws ImagingException, IOException - Throws:
ImagingExceptionIOException
-
parsePhotoshopSegment
public PhotoshopApp13Data parsePhotoshopSegment(byte[] bytes, ImagingParameters<JpegImagingParameters> params) throws ImagingException, IOException - Throws:
ImagingExceptionIOException
-
writeIptcBlock
- Throws:
ImagingExceptionIOException
-
writeIptcBlock
public byte[] writeIptcBlock(List<IptcRecord> elements, boolean forceUtf8Encoding) throws ImagingException, IOException - Throws:
ImagingExceptionIOException
-
writePhotoshopApp13Segment
public byte[] writePhotoshopApp13Segment(PhotoshopApp13Data data) throws IOException, ImagingException - Throws:
IOExceptionImagingException
-