Class IptcParser
java.lang.Object
org.apache.commons.imaging.common.BinaryFileParser
org.apache.commons.imaging.formats.jpeg.iptc.IptcParser
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
isPhotoshopJpegSegment
(byte[] segmentData) parseAllBlocks
(byte[] bytes, boolean strict) protected List
<IptcRecord> parseIPTCBlock
(byte[] bytes) parsePhotoshopSegment
(byte[] bytes, boolean strict) parsePhotoshopSegment
(byte[] bytes, Map<String, Object> params) byte[]
writeIPTCBlock
(List<IptcRecord> elements) byte[]
Methods inherited from class org.apache.commons.imaging.common.BinaryFileParser
debugNumber, debugNumber, getByteOrder, setByteOrder
-
Field Details
-
LOGGER
-
APP13_BYTE_ORDER
-
PHOTOSHOP_IGNORED_BLOCK_TYPE
Block types (or Image Resource IDs) that are not recommended to be interpreted when libraries process Photoshop IPTC metadata.- Since:
- 1.0-alpha2
-
-
Constructor Details
-
IptcParser
public IptcParser()
-
-
Method Details
-
isPhotoshopJpegSegment
public boolean isPhotoshopJpegSegment(byte[] segmentData) -
parsePhotoshopSegment
public PhotoshopApp13Data parsePhotoshopSegment(byte[] bytes, Map<String, Object> params) throws ImageReadException, IOException- Throws:
ImageReadException
IOException
-
parsePhotoshopSegment
public PhotoshopApp13Data parsePhotoshopSegment(byte[] bytes, boolean strict) throws ImageReadException, IOException - Throws:
ImageReadException
IOException
-
parseIPTCBlock
- Throws:
IOException
-
parseAllBlocks
protected List<IptcBlock> parseAllBlocks(byte[] bytes, boolean strict) throws ImageReadException, IOException - Throws:
ImageReadException
IOException
-
writePhotoshopApp13Segment
public byte[] writePhotoshopApp13Segment(PhotoshopApp13Data data) throws IOException, ImageWriteException - Throws:
IOException
ImageWriteException
-
writeIPTCBlock
- Throws:
ImageWriteException
IOException
-