public class ReadJP2File
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private int |
fileFormat
Definition in
CADI.Server.LogicalTarget.JPEG2000.JP2LogicalTarget#fileFormatType |
private BoxIndexing |
fileIndexing |
private BufferedDataInputStream |
in
Is an object with the input stream where the main header is read from.
|
private boolean |
jp2HeaderBoxFound
Indicates whether the JP2 header box has been found.
|
private JPCParameters |
jpcParameters
Is an object where the main header are saved.
|
private long |
mainHeaderInitialPos
Is the file pointer to the first byte of the main header.
|
private int |
mainHeaderLength
Is the length of the main header.
|
Constructor and Description |
---|
ReadJP2File(BufferedDataInputStream in,
BoxIndexing fileIndexing)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getFileFormat()
Returns the
fileFormat attribute. |
JPCParameters |
getJPCParameters()
Returns the
jpcParameters attribute. |
long |
getMainHeaderInitialPos()
Returns the
mainHeaderInitialPos attribute. |
int |
getMainHeaderLength()
Returns the
mainHeaderLength attribute. |
private void |
readContiguousCodestreamBox(long length)
Reads the Contiguous Codestream Box and checks its conformity.
|
private void |
readIntPropertyBox(long length) |
private void |
readUUIDBox(long length) |
private void |
readUUIDInfoBox(long length) |
private void |
readXMLBox(long length) |
void |
run()
Reads the boxes of the JP2 headers and checks their conformity.
|
private BufferedDataInputStream in
private JPCParameters jpcParameters
private long mainHeaderInitialPos
private int mainHeaderLength
private int fileFormat
CADI.Server.LogicalTarget.JPEG2000.JP2LogicalTarget#fileFormatType
private BoxIndexing fileIndexing
private boolean jp2HeaderBoxFound
public ReadJP2File(BufferedDataInputStream in, BoxIndexing fileIndexing)
in
- input stream where data will be read from.public void run() throws ErrorException, java.io.EOFException, java.io.IOException
ErrorException
- when the header information is ambiguous or incorrectjava.io.EOFException
java.io.IOException
public int getFileFormat()
fileFormat
attribute.fileFormat
attribute.public JPCParameters getJPCParameters()
jpcParameters
attribute.jpcParameters
attribute.public long getMainHeaderInitialPos()
mainHeaderInitialPos
attribute.mainHeaderInitialPos
attribute.public int getMainHeaderLength()
mainHeaderLength
attribute.mainHeaderLength
attribute.private void readContiguousCodestreamBox(long length) throws ErrorException
ErrorException
- when the header information is ambiguous or incorrectprivate void readIntPropertyBox(long length) throws java.io.IOException
length
- java.io.IOException
private void readXMLBox(long length) throws java.io.IOException
length
- java.io.IOException
private void readUUIDBox(long length) throws java.io.IOException
length
- java.io.IOException
private void readUUIDInfoBox(long length) throws java.io.IOException
length
- java.io.IOException
CADI - Copyright (C) 2007
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Group on Interactive Coding of Images (GICI) (contact)