colorspace.boxes
Class JP2Box

java.lang.Object
  |
  +--colorspace.boxes.JP2Box
Direct Known Subclasses:
ChannelDefinitionBox, ColorSpecificationBox, ComponentMappingBox, ImageHeaderBox, PaletteBox

public abstract class JP2Box
extends java.lang.Object

The abstract super class modeling the aspects of a JP2 box common to all such boxes.


Nested Class Summary
protected static class JP2Box.BoxType
          JP2 Box structure analysis help
 
Field Summary
protected  int boxEnd
          offset to end of box
protected  int boxStart
          offset to start of box
protected  int dataStart
          offset to start of data in box
static java.lang.String eol
          Platform dependant line terminator
protected  RandomAccessIO in
          input file
 int length
          Length of the box.
static int type
          Box type
 
Constructor Summary
JP2Box()
           
JP2Box(RandomAccessIO in, int boxStart)
          Construct a JP2Box from an input image.
 
Method Summary
 java.lang.String getTypeString()
          Return the box type as a String.
static java.lang.String getTypeString(int t)
          Return a String representation of the Box type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

eol

public static final java.lang.String eol
Platform dependant line terminator


type

public static int type
Box type


length

public int length
Length of the box.


in

protected RandomAccessIO in
input file


boxStart

protected int boxStart
offset to start of box


boxEnd

protected int boxEnd
offset to end of box


dataStart

protected int dataStart
offset to start of data in box

Constructor Detail

JP2Box

public JP2Box()
       throws ColorSpaceException

JP2Box

public JP2Box(RandomAccessIO in,
              int boxStart)
       throws java.io.IOException,
              ColorSpaceException
Construct a JP2Box from an input image.

Parameters:
in - RandomAccessIO jp2 image
boxStart - offset to the start of the box in the image
Throws:
IOException, - ColorSpaceException
java.io.IOException
ColorSpaceException
Method Detail

getTypeString

public static java.lang.String getTypeString(int t)
Return a String representation of the Box type.


getTypeString

public java.lang.String getTypeString()
Return the box type as a String.