Package net.sourceforge.jiu.codecs.jpeg
Class JPEGMarkerReader
- java.lang.Object
-
- net.sourceforge.jiu.codecs.jpeg.JPEGMarkerReader
-
-
Constructor Summary
Constructors Modifier Constructor Description privateJPEGMarkerReader()Private constructor to prevent instantiation.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidreadHuffmanTables(DataInput in, JPEGData jpegData, int length)static voidreadQuantizationTables(DataInput in, JPEGData jpegData, int length)Read quantization tables from a DQT marker.static voidreadStartOfFrame(DataInput in, JPEGData jpegData, int marker, int length)static voidreadStartOfScan(DataInput in, JPEGData jpegData, int length)Read an SOS (start of scan) marker.
-
-
-
Method Detail
-
readHuffmanTables
public static void readHuffmanTables(DataInput in, JPEGData jpegData, int length) throws InvalidFileStructureException, IOException
-
readQuantizationTables
public static void readQuantizationTables(DataInput in, JPEGData jpegData, int length) throws InvalidFileStructureException, IOException
Read quantization tables from a DQT marker. P&M 7.8.3, p. 118f.- Parameters:
jpegData- data object which will store the table(s)length- length of marker- Throws:
InvalidFileStructureException- if the DQT contains invalid dataIOException- on reading errors
-
readStartOfFrame
public static void readStartOfFrame(DataInput in, JPEGData jpegData, int marker, int length) throws InvalidFileStructureException, IOException, UnsupportedTypeException
-
readStartOfScan
public static void readStartOfScan(DataInput in, JPEGData jpegData, int length) throws InvalidFileStructureException, IOException, UnsupportedTypeException
Read an SOS (start of scan) marker. P&M 7.6, p. 113.- Parameters:
in- source to read marker information fromjpegData-JPEGDataobject to update with information from the markerlength- size of marker in bytes- Throws:
InvalidFileStructureException- if encountered data does not follow the JPEG standardIOException- on I/O errorsUnsupportedTypeException- if encountered data is valid but unsupported by this package
-
-