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 ".)
  • Constructor Details

    • FileTypeBox

      public FileTypeBox(int br, int minorVersion, int[] comp)
      Constructs a FileTypeBox from the provided brand, minor version and compatibility list.
    • FileTypeBox

      public FileTypeBox(byte[] data)
      Constructs a FileTypeBox from the provided byte array.
    • FileTypeBox

      public FileTypeBox(Node node) throws IIOInvalidTreeException
      Constructs a FileTypeBox from org.w3c.dom.Node.
      Throws:
      IIOInvalidTreeException
  • Method Details

    • 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 an IIOMetadataNode 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 class Box
    • 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.
      Overrides:
      parse in class Box
    • compose

      protected void compose()
      Description copied from class: Box
      Composes the content byte array from the data elements.
      Overrides:
      compose in class Box