Class IptcParser
- java.lang.Object
-
- org.apache.commons.imaging.common.BinaryFileParser
-
- org.apache.commons.imaging.formats.jpeg.iptc.IptcParser
-
public class IptcParser extends BinaryFileParser
-
-
Field Summary
Fields Modifier and Type Field Description private static java.nio.ByteOrder
APP13_BYTE_ORDER
private static java.util.logging.Logger
LOGGER
private static java.util.List<java.lang.Integer>
PHOTOSHOP_IGNORED_BLOCK_TYPE
Block types (or Image Resource IDs) that are not recommended to be interpreted when libraries process Photoshop IPTC metadata.
-
Constructor Summary
Constructors Constructor Description IptcParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isPhotoshopJpegSegment(byte[] segmentData)
protected java.util.List<IptcBlock>
parseAllBlocks(byte[] bytes, boolean strict)
protected java.util.List<IptcRecord>
parseIPTCBlock(byte[] bytes)
PhotoshopApp13Data
parsePhotoshopSegment(byte[] bytes, boolean strict)
PhotoshopApp13Data
parsePhotoshopSegment(byte[] bytes, java.util.Map<java.lang.String,java.lang.Object> params)
byte[]
writeIPTCBlock(java.util.List<IptcRecord> elements)
byte[]
writePhotoshopApp13Segment(PhotoshopApp13Data data)
-
Methods inherited from class org.apache.commons.imaging.common.BinaryFileParser
debugNumber, debugNumber, getByteOrder, setByteOrder
-
-
-
-
Field Detail
-
LOGGER
private static final java.util.logging.Logger LOGGER
-
APP13_BYTE_ORDER
private static final java.nio.ByteOrder APP13_BYTE_ORDER
-
PHOTOSHOP_IGNORED_BLOCK_TYPE
private static final java.util.List<java.lang.Integer> 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
-
-
Method Detail
-
isPhotoshopJpegSegment
public boolean isPhotoshopJpegSegment(byte[] segmentData)
-
parsePhotoshopSegment
public PhotoshopApp13Data parsePhotoshopSegment(byte[] bytes, java.util.Map<java.lang.String,java.lang.Object> params) throws ImageReadException, java.io.IOException
- Throws:
ImageReadException
java.io.IOException
-
parsePhotoshopSegment
public PhotoshopApp13Data parsePhotoshopSegment(byte[] bytes, boolean strict) throws ImageReadException, java.io.IOException
- Throws:
ImageReadException
java.io.IOException
-
parseIPTCBlock
protected java.util.List<IptcRecord> parseIPTCBlock(byte[] bytes) throws java.io.IOException
- Throws:
java.io.IOException
-
parseAllBlocks
protected java.util.List<IptcBlock> parseAllBlocks(byte[] bytes, boolean strict) throws ImageReadException, java.io.IOException
- Throws:
ImageReadException
java.io.IOException
-
writePhotoshopApp13Segment
public byte[] writePhotoshopApp13Segment(PhotoshopApp13Data data) throws java.io.IOException, ImageWriteException
- Throws:
java.io.IOException
ImageWriteException
-
writeIPTCBlock
public byte[] writeIPTCBlock(java.util.List<IptcRecord> elements) throws ImageWriteException, java.io.IOException
- Throws:
ImageWriteException
java.io.IOException
-
-