public class JPEGMarkerReader
extends java.lang.Object
DataInput
source into objects of the appropriate
data classes.
Objects are then added to a JPEGData
object.Modifier | Constructor and Description |
---|---|
private |
JPEGMarkerReader()
Private constructor to prevent instantiation.
|
Modifier and Type | Method and Description |
---|---|
static void |
readHuffmanTables(java.io.DataInput in,
JPEGData jpegData,
int length) |
static void |
readQuantizationTables(java.io.DataInput in,
JPEGData jpegData,
int length)
Read quantization tables from a DQT marker.
|
static void |
readStartOfFrame(java.io.DataInput in,
JPEGData jpegData,
int marker,
int length) |
static void |
readStartOfScan(java.io.DataInput in,
JPEGData jpegData,
int length)
Read an SOS (start of scan) marker.
|
private JPEGMarkerReader()
public static void readHuffmanTables(java.io.DataInput in, JPEGData jpegData, int length) throws InvalidFileStructureException, java.io.IOException
InvalidFileStructureException
java.io.IOException
public static void readQuantizationTables(java.io.DataInput in, JPEGData jpegData, int length) throws InvalidFileStructureException, java.io.IOException
jpegData
- data object which will store the table(s)length
- length of markerInvalidFileStructureException
- if the DQT contains invalid datajava.io.IOException
- on reading errorspublic static void readStartOfFrame(java.io.DataInput in, JPEGData jpegData, int marker, int length) throws InvalidFileStructureException, java.io.IOException, UnsupportedTypeException
InvalidFileStructureException
java.io.IOException
UnsupportedTypeException
public static void readStartOfScan(java.io.DataInput in, JPEGData jpegData, int length) throws InvalidFileStructureException, java.io.IOException, UnsupportedTypeException
in
- source to read marker information fromjpegData
- JPEGData
object to update with information from the markerlength
- size of marker in bytesInvalidFileStructureException
- if encountered data does not follow the JPEG standardjava.io.IOException
- on I/O errorsUnsupportedTypeException
- if encountered data is valid but unsupported by this package