| |
|
| java.lang.Object jj2000.j2k.fileformat.reader.FileFormatReader
FileFormatReader | public class FileFormatReader implements FileFormatBoxes(Code) | | This class reads the file format wrapper that may or may not exist around a
valid JPEG 2000 codestream. Since no information from the file format is
used in the actual decoding, this class simply goes through the file and
finds the first valid codestream.
See Also: jj2000.j2k.fileformat.writer.FileFormatWriter |
FileFormatReader | public FileFormatReader(RandomAccessIO in, J2KMetadata metadata)(Code) | | The constructor of the FileFormatReader
Parameters: in - The RandomAccessIO from which to read the file format |
getCodeStreamPos | public long[] getCodeStreamPos()(Code) | | This method creates and returns an array of positions to contiguous
codestreams in the file
The positions of the contiguous codestreams in the file |
getColorModel | public ColorModel getColorModel()(Code) | | Returns the color model created from the palette box.
|
getFirstCodeStreamLength | public int getFirstCodeStreamLength()(Code) | | This method returns the length of the first contiguous codestreams in
the file
The length of the first contiguous codestream in the file |
getFirstCodeStreamPos | public int getFirstCodeStreamPos()(Code) | | This method returns the position of the first contiguous codestreams in
the file
The position of the first contiguous codestream in the file |
readBitsPerComponentBox | public void readBitsPerComponentBox(int length) throws IOException(Code) | | Read the bits per component.
|
readChannelDefinitionBox | public void readChannelDefinitionBox(int length) throws IOException(Code) | | This method reads the Channel Definition box
exception: java.io.IOException - If an I/O error ocurred. |
readColourSpecificationBox | public void readColourSpecificationBox(int length) throws IOException(Code) | | Read the color specifications.
|
readComponentMappingBox | public void readComponentMappingBox(int length) throws IOException(Code) | | Read the component mapping channel.
|
readContiguousCodeStreamBox | public boolean readContiguousCodeStreamBox(int length, long longLength) throws IOException, EOFException(Code) | | This method skips the Contiguous codestream box and adds position
of contiguous codestream to a vector
Parameters: pos - The position in the file Parameters: length - The length of the JP2Header box long length The length of the JP2Header box if greater than 1<<32 false if the Contiguous codestream box was not found or invalidelse true exception: java.io.IOException - If an I/O error ocurred. exception: java.io.EOFException - If the end of file was reached |
readFileFormat | public void readFileFormat() throws IOException, EOFException(Code) | | This method checks whether the given RandomAccessIO is a valid JP2 file
and if so finds the first codestream in the file. Currently, the
information in the codestream is not used
Parameters: in - The RandomAccessIO from which to read the file format exception: java.io.IOException - If an I/O error ocurred. exception: java.io.EOFException - If end of file is reached |
readImageHeaderBox | public boolean readImageHeaderBox(int length) throws IOException, EOFException(Code) | | This method reads the Image Header box
Parameters: length - The length of the JP2Header box false if the JP2Header box was not found or invalid else true exception: java.io.IOException - If an I/O error ocurred. exception: java.io.EOFException - If the end of file was reached |
readIntPropertyBox | public void readIntPropertyBox(int length) throws IOException(Code) | | This method reads the contents of the Intellectual property box
|
readJP2HeaderBox | public boolean readJP2HeaderBox(int length) throws IOException, EOFException(Code) | | This method reads the JP2Header box
Parameters: pos - The position in the file Parameters: length - The length of the JP2Header box long length The length of the JP2Header box if greater than1<<32 false if the JP2Header box was not found or invalid else true exception: java.io.IOException - If an I/O error ocurred. exception: java.io.EOFException - If the end of file was reached |
readPaletteBox | public void readPaletteBox(int length) throws IOException(Code) | | This method reads the content of the palette box
|
readResolutionBox | public void readResolutionBox(int type, int length) throws IOException(Code) | | Read the resolution.
|
readURLBox | public void readURLBox(int length) throws IOException(Code) | | This method reads the contents of the XML box
|
readUUIDBox | public void readUUIDBox(int length) throws IOException(Code) | | This method reads the contents of the Intellectual property box
|
readUUIDListBox | public void readUUIDListBox(int length) throws IOException(Code) | | This method reads the contents of the UUID List box
|
readXMLBox | public void readXMLBox(int length) throws IOException(Code) | | This method reads the contents of the XML box
|
|
|
|