|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectBoxUtilities
public class BoxUtilities
Field Summary | |
---|---|
static Map<Integer,Class<? extends BaseJP2KBox>> |
boxClasses
A Hashtable contains the class names for each type of the boxes. |
static Map<Integer,String> |
boxNames
|
static String |
JP2_ASOC_LBL_GML_DATA
|
static Map<Integer,String> |
names
The table to link tag names for all the JP2 boxes. |
static Set<String> |
SUPERBOX_NAMES
|
Constructor Summary | |
---|---|
BoxUtilities()
|
Method Summary | |
---|---|
static void |
copyInt(byte[] data,
int pos,
int value)
Copies that four bytes of an integer into the byte array. |
static JP2KBox |
createBox(int type,
byte[] data)
Creates a Box object with the provided type
based on the provided data object based on reflection. |
static JP2KBox |
createBox(int type,
Node node)
Creates a Box object with the provided type
based on the provided Node object based on reflection. |
static Object |
getAttribute(Node node,
String name)
Extracts the value of the attribute from name. |
static Class<? extends BaseJP2KBox> |
getBoxClass(int type)
Returns the Box class for the box with the provided type . |
static String |
getBoxName(int type)
Returns the BoxName for the box with the provided type . |
static byte[] |
getByteArrayElementValue(Node node)
Gets the byte array from an IIOMetadataNode . |
static byte |
getByteElementValue(Node node)
Gets its byte value from an IIOMetadataNode . |
static byte[] |
getContent(Jp2_input_box box)
|
static int[] |
getIntArrayElementValue(Node node)
Gets the integer array from an IIOMetadataNode . |
static int |
getIntElementValue(Node node)
Gets its integer value from an IIOMetadataNode . |
static String |
getName(int type)
Returns the XML tag name defined in JP2 XML xsd/dtd for the box with the provided type . |
static short |
getShortElementValue(Node node)
Gets its short value from an IIOMetadataNode . |
static String |
getStringElementValue(Node node)
Gets its String value from an IIOMetadataNode . |
static String |
getTypeByName(String name)
Returns the type String based on the provided name. |
static int |
getTypeInt(String s)
Converts the box type from integer to string. |
static String |
getTypeString(int type)
Converts the box type from integer to string. |
static int |
getValue(int c)
Return the numeric decimal value of an ASCII code representing a Hexadecimal value. |
static byte[] |
parseByteArray(String value)
Parses the byte array expressed by a string. |
static int[] |
parseIntArray(String value)
Parses the integer array expressed a string. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String JP2_ASOC_LBL_GML_DATA
public static final Map<Integer,Class<? extends BaseJP2KBox>> boxClasses
public static final Map<Integer,String> boxNames
public static final Map<Integer,String> names
public static final Set<String> SUPERBOX_NAMES
Constructor Detail |
---|
public BoxUtilities()
Method Detail |
---|
public static void copyInt(byte[] data, int pos, int value)
public static JP2KBox createBox(int type, Node node) throws IIOInvalidTreeException
Box
object with the provided type
based on the provided Node object based on reflection.
IIOInvalidTreeException
public static JP2KBox createBox(int type, byte[] data)
Box
object with the provided type
based on the provided data object based on reflection.
public static Object getAttribute(Node node, String name)
public static byte[] getByteArrayElementValue(Node node)
IIOMetadataNode
.
public static byte getByteElementValue(Node node)
IIOMetadataNode
.
public static int[] getIntArrayElementValue(Node node)
IIOMetadataNode
.
public static int getIntElementValue(Node node)
IIOMetadataNode
.
public static String getName(int type)
type
. If the type
is not known,
the string "unknown"
is returned.
public static String getBoxName(int type)
type
.
If the type
is not known, the string
"unknown"
is returned.
public static short getShortElementValue(Node node)
IIOMetadataNode
.
public static String getStringElementValue(Node node)
String
value from an IIOMetadataNode
.
public static String getTypeByName(String name)
public static int getTypeInt(String s)
public static String getTypeString(int type)
public static byte[] parseByteArray(String value)
public static int[] parseIntArray(String value)
public static Class<? extends BaseJP2KBox> getBoxClass(int type)
type
.
public static int getValue(int c)
c
- the ASCII code representing a Hexadecimal value.
public static byte[] getContent(Jp2_input_box box) throws KduException
box
-
KduException
- TODO optimize me
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |