public class ReadJPEG2KFileFormat
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
FILE_FORMAT_JP2 |
static int |
FILE_FORMAT_JPC |
static int |
FILE_FORMAT_JPK |
static int |
FILE_FORMAT_JPX |
private int |
fileFormat
|
private BoxIndexing |
fileIndexing |
private BufferedDataInputStream |
in
Is an object with the input stream where the main header is read from.
|
Constructor and Description |
---|
ReadJPEG2KFileFormat(BufferedDataInputStream in,
BoxIndexing fileIndexing)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getFileFormat()
Returns the
fileFormat attribute. |
private void |
readFileTypeBox(long length)
Reads the File Type Box and checks its conformity.
|
private boolean |
readSignatureBox()
Reads the Signature Box and checks its conformity.
|
int |
run() |
private BufferedDataInputStream in
private BoxIndexing fileIndexing
private int fileFormat
public static final int FILE_FORMAT_JPC
public static final int FILE_FORMAT_JP2
public static final int FILE_FORMAT_JPX
public static final int FILE_FORMAT_JPK
public ReadJPEG2KFileFormat(BufferedDataInputStream in, BoxIndexing fileIndexing)
in
- input stream where data will be read from.public int run() throws java.io.EOFException, ErrorException, java.io.IOException
fileFormat
attribute.java.io.IOException
ErrorException
java.io.EOFException
public int getFileFormat()
fileFormat
attribute.fileFormat
attribute.private boolean readSignatureBox() throws ErrorException, java.io.EOFException, java.io.IOException
ErrorException
- when the header information is ambiguous or incorrectjava.io.EOFException
java.io.IOException
private void readFileTypeBox(long length) throws ErrorException, java.io.EOFException, java.io.IOException
length
- ErrorException
- when the header information is ambiguous or incorrectjava.io.EOFException
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)