net.sf.ext.mediamanager.ebml
Class BinaryElement

java.lang.Object
  extended bynet.sf.ext.mediamanager.ebml.Element
      extended bynet.sf.ext.mediamanager.ebml.BinaryElement
Direct Known Subclasses:
FloatElement, MatroskaBlock, SignedInteger, StringElement, UnsignedInteger

public class BinaryElement
extends Element

Defines the basic EBML element. Subclasses may provide child element access.

Author:
John Cannon

Field Summary
 
Fields inherited from class net.sf.ext.mediamanager.ebml.Element
data, dataRead, parent, size, type, typeInfo
 
Constructor Summary
BinaryElement(byte[] type)
           
 
Method Summary
static int codedSizeLength(long value)
           
 byte[] getData()
          Getter for property data.
static int getMinByteSize(long value)
           
static int getMinByteSizeUnsigned(long value)
           
static int getMinSizeLength()
           
 long getSize()
          Getter for property size.
 byte[] getType()
          Getter for property type.
static byte[] makeEbmlCode(byte[] typeID, long size)
           
static byte[] makeEbmlCodedSize(long size)
           
static byte[] packInt(long value)
           
static byte[] packIntUnsigned(long value)
           
 void setData(byte[] data)
          Setter for property data.
static void setMinSizeLength(int minSize)
           
 void setSize(long size)
          Setter for property size.
 void setType(byte[] type)
          Setter for property type.
 byte[] toByteArray()
           
 
Methods inherited from class net.sf.ext.mediamanager.ebml.Element
EBMLCodedSizeLength, EBMLSignedCodedSizeLength, equals, equals, getElementType, getParent, readData, setElementType, setParent, skipData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinaryElement

public BinaryElement(byte[] type)
Method Detail

getData

public byte[] getData()
Getter for property data.

Overrides:
getData in class Element
Returns:
Value of property data.

setData

public void setData(byte[] data)
Setter for property data.

Overrides:
setData in class Element
Parameters:
data - New value of property data.

getSize

public long getSize()
Getter for property size.

Overrides:
getSize in class Element
Returns:
Value of property size.

setSize

public void setSize(long size)
Setter for property size.

Overrides:
setSize in class Element
Parameters:
size - New value of property size.

getType

public byte[] getType()
Getter for property type.

Overrides:
getType in class Element
Returns:
Value of property type.

setType

public void setType(byte[] type)
Setter for property type.

Overrides:
setType in class Element
Parameters:
type - New value of property type.

toByteArray

public byte[] toByteArray()
Overrides:
toByteArray in class Element

setMinSizeLength

public static void setMinSizeLength(int minSize)

getMinSizeLength

public static int getMinSizeLength()

makeEbmlCode

public static byte[] makeEbmlCode(byte[] typeID,
                                  long size)

makeEbmlCodedSize

public static byte[] makeEbmlCodedSize(long size)

getMinByteSize

public static int getMinByteSize(long value)

getMinByteSizeUnsigned

public static int getMinByteSizeUnsigned(long value)

codedSizeLength

public static int codedSizeLength(long value)

packIntUnsigned

public static byte[] packIntUnsigned(long value)

packInt

public static byte[] packInt(long value)