Class JpegRewriter
java.lang.Object
org.apache.commons.imaging.common.BinaryFileParser
org.apache.commons.imaging.formats.jpeg.xmp.JpegRewriter
- Direct Known Subclasses:
JpegIptcRewriter, JpegXmpRewriter
Interface for Exif write/update/remove functionality for Jpeg/JFIF images.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class(package private) static classprotected static classprotected static classprivate static interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final JpegRewriter.SegmentFilterprivate static final ByteOrderprivate static final JpegRewriter.SegmentFilterprivate static final JpegRewriter.SegmentFilter -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new instance with the default, big-endian, byte order. -
Method Summary
Modifier and TypeMethodDescriptionprotected JpegRewriter.JFIFPiecesanalyzeJfif(ByteSource byteSource) protected <T extends JpegRewriter.JFIFPiece>
List<T> filterSegments(List<T> segments, JpegRewriter.SegmentFilter filter) protected <T extends JpegRewriter.JFIFPiece>
List<T> filterSegments(List<T> segments, JpegRewriter.SegmentFilter filter, boolean reverse) protected <T extends JpegRewriter.JFIFPiece>
List<T> findPhotoshopApp13Segments(List<T> segments) protected <T extends JpegRewriter.JFIFPiece, U extends JpegRewriter.JFIFPiece>
List<JpegRewriter.JFIFPiece> insertAfterLastAppSegments(List<T> segments, List<U> newSegments) protected <T extends JpegRewriter.JFIFPiece, U extends JpegRewriter.JFIFPiece>
List<JpegRewriter.JFIFPiece> insertBeforeFirstAppSegments(List<T> segments, List<U> newSegments) protected <T extends JpegRewriter.JFIFPiece>
List<T> removeExifSegments(List<T> segments) protected <T extends JpegRewriter.JFIFPiece>
List<T> removePhotoshopApp13Segments(List<T> segments) protected <T extends JpegRewriter.JFIFPiece>
List<T> removeXmpSegments(List<T> segments) protected voidwriteSegments(OutputStream outputStream, List<? extends JpegRewriter.JFIFPiece> segments) Methods inherited from class BinaryFileParser
debugNumber, debugNumber, getByteOrder, setByteOrder
-
Field Details
-
JPEG_BYTE_ORDER
-
EXIF_SEGMENT_FILTER
-
XMP_SEGMENT_FILTER
-
PHOTOSHOP_APP13_SEGMENT_FILTER
-
-
Constructor Details
-
JpegRewriter
public JpegRewriter()Constructs a new instance with the default, big-endian, byte order.Whether a file contains an image based on its file extension.
-
-
Method Details
-
analyzeJfif
protected JpegRewriter.JFIFPieces analyzeJfif(ByteSource byteSource) throws ImagingException, IOException - Throws:
ImagingExceptionIOException
-
filterSegments
protected <T extends JpegRewriter.JFIFPiece> List<T> filterSegments(List<T> segments, JpegRewriter.SegmentFilter filter) -
filterSegments
protected <T extends JpegRewriter.JFIFPiece> List<T> filterSegments(List<T> segments, JpegRewriter.SegmentFilter filter, boolean reverse) -
findPhotoshopApp13Segments
-
insertAfterLastAppSegments
protected <T extends JpegRewriter.JFIFPiece, U extends JpegRewriter.JFIFPiece> List<JpegRewriter.JFIFPiece> insertAfterLastAppSegments(List<T> segments, List<U> newSegments) throws ImagingException - Throws:
ImagingException
-
insertBeforeFirstAppSegments
protected <T extends JpegRewriter.JFIFPiece, U extends JpegRewriter.JFIFPiece> List<JpegRewriter.JFIFPiece> insertBeforeFirstAppSegments(List<T> segments, List<U> newSegments) throws ImagingException - Throws:
ImagingException
-
removeExifSegments
-
removePhotoshopApp13Segments
-
removeXmpSegments
-
writeSegments
protected void writeSegments(OutputStream outputStream, List<? extends JpegRewriter.JFIFPiece> segments) throws IOException - Throws:
IOException
-