Class JPEGFile
java.lang.Object
org.apache.xmlgraphics.image.loader.impl.JPEGFile
- All Implemented Interfaces:
JPEGConstants
Provides methods useful for processing JPEG files.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final org.apache.commons.logging.Log
logger -
Constructor Summary
ConstructorsConstructorDescriptionJPEGFile
(InputStream in) Constructor for InputStreams.Constructor for ImageInputStreams. -
Method Summary
Modifier and TypeMethodDescriptionReturns theDataInput
instance this object operates on.int
Reads the next marker segment identifier and returns it.int
Reads the segment length of the current marker segment and returns it.void
Skips the current marker segment.
-
Field Details
-
log
protected static final org.apache.commons.logging.Log loglogger
-
-
Constructor Details
-
JPEGFile
Constructor for ImageInputStreams.- Parameters:
in
- the input stream to read the image from
-
JPEGFile
Constructor for InputStreams.- Parameters:
in
- the input stream to read the image from
-
-
Method Details
-
getDataInput
Returns theDataInput
instance this object operates on.- Returns:
- the data input instance
-
readMarkerSegment
Reads the next marker segment identifier and returns it.- Returns:
- the marker segment identifier
- Throws:
IOException
- if an I/O error occurs while reading from the image file
-
readSegmentLength
Reads the segment length of the current marker segment and returns it. The method assumes the file cursor is right after the segment header.- Returns:
- the segment length
- Throws:
IOException
- if an I/O error occurs while reading from the image file
-
skipCurrentMarkerSegment
Skips the current marker segment. The method assumes the file cursor is right after the segment header.- Throws:
IOException
- if an I/O error occurs while reading from the image file
-