Class FileTypeBox
- java.lang.Object
-
- com.sun.media.imageioimpl.plugins.jpeg2000.Box
-
- com.sun.media.imageioimpl.plugins.jpeg2000.FileTypeBox
-
public class FileTypeBox extends Box
This class is defined to represent a File Type Box of JPEG JP2 file format. A File Type Box has a length, and a fixed type of "ftyp". The content of a file type box contains the brand ("jp2 " for JP2 file", the minor version (0 for JP2 file format), and a compatibility list (one of which should be "jp2 " if brand is not "jp2 ".)
-
-
Field Summary
-
Fields inherited from class com.sun.media.imageioimpl.plugins.jpeg2000.Box
data, extraLength, length, type
-
-
Constructor Summary
Constructors Constructor Description FileTypeBox(byte[] data)
Constructs aFileTypeBox
from the provided byte array.FileTypeBox(int br, int minorVersion, int[] comp)
Constructs aFileTypeBox
from the provided brand, minor version and compatibility list.FileTypeBox(Node node)
Constructs aFileTypeBox
fromorg.w3c.dom.Node
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
compose()
Composes the content byte array from the data elements.int
getBrand()
Returns the brand of this file type box.int[]
getCompatibilityList()
Returns the compatibilty list of this file type box.static String[]
getElementNames()
This method will be called by the getNativeNodeForSimpleBox of the class Box to get the element names.int
getMinorVersion()
Returns the minor version of this file type box.IIOMetadataNode
getNativeNode()
Creates anIIOMetadataNode
from this file type box.protected void
parse(byte[] data)
Parses the data elements from the byte array.-
Methods inherited from class com.sun.media.imageioimpl.plugins.jpeg2000.Box
copyInt, createBox, getAttribute, getBoxClass, getByteArrayElementValue, getByteElementValue, getContent, getExtraLength, getIntArrayElementValue, getIntElementValue, getLength, getName, getNativeNodeForSimpleBox, getShortElementValue, getStringElementValue, getType, getTypeByName, getTypeInt, getTypeString, parseByteArray, parseIntArray, read, setContent, setDefaultAttributes, setExtraLength, setLength, write
-
-
-
-
Constructor Detail
-
FileTypeBox
public FileTypeBox(int br, int minorVersion, int[] comp)
Constructs aFileTypeBox
from the provided brand, minor version and compatibility list.
-
FileTypeBox
public FileTypeBox(byte[] data)
Constructs aFileTypeBox
from the provided byte array.
-
FileTypeBox
public FileTypeBox(Node node) throws IIOInvalidTreeException
Constructs aFileTypeBox
fromorg.w3c.dom.Node
.- Throws:
IIOInvalidTreeException
-
-
Method Detail
-
getElementNames
public static String[] getElementNames()
This method will be called by the getNativeNodeForSimpleBox of the class Box to get the element names.
-
getBrand
public int getBrand()
Returns the brand of this file type box.
-
getMinorVersion
public int getMinorVersion()
Returns the minor version of this file type box.
-
getCompatibilityList
public int[] getCompatibilityList()
Returns the compatibilty list of this file type box.
-
getNativeNode
public IIOMetadataNode getNativeNode()
Creates anIIOMetadataNode
from this file type box. The format of this node is defined in the XML dtd and xsd for the JP2 image file.- Overrides:
getNativeNode
in classBox
-
parse
protected void parse(byte[] data)
Description copied from class:Box
Parses the data elements from the byte array. The subclasses should override this method.
-
-