Class FileTypeBox
java.lang.Object
com.sun.media.imageioimpl.plugins.jpeg2000.Box
com.sun.media.imageioimpl.plugins.jpeg2000.FileTypeBox
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
ConstructorsConstructorDescriptionFileTypeBox(byte[] data) Constructs aFileTypeBoxfrom the provided byte array.FileTypeBox(int br, int minorVersion, int[] comp) Constructs aFileTypeBoxfrom the provided brand, minor version and compatibility list.FileTypeBox(Node node) Constructs aFileTypeBoxfromorg.w3c.dom.Node. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcompose()Composes the content byte array from the data elements.intgetBrand()Returns the brand of this file type box.int[]Returns the compatibilty list of this file type box.static String[]This method will be called by the getNativeNodeForSimpleBox of the class Box to get the element names.intReturns the minor version of this file type box.Creates anIIOMetadataNodefrom this file type box.protected voidparse(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 Details
-
FileTypeBox
public FileTypeBox(int br, int minorVersion, int[] comp) Constructs aFileTypeBoxfrom the provided brand, minor version and compatibility list. -
FileTypeBox
public FileTypeBox(byte[] data) Constructs aFileTypeBoxfrom the provided byte array. -
FileTypeBox
Constructs aFileTypeBoxfromorg.w3c.dom.Node.- Throws:
IIOInvalidTreeException
-
-
Method Details
-
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
Creates anIIOMetadataNodefrom this file type box. The format of this node is defined in the XML dtd and xsd for the JP2 image file.- Overrides:
getNativeNodein classBox
-
parse
protected void parse(byte[] data) Description copied from class:BoxParses the data elements from the byte array. The subclasses should override this method. -
compose
protected void compose()Description copied from class:BoxComposes the content byte array from the data elements.
-