org.jcodec.containers.mkv.ebml
Class SignedIntegerElement

java.lang.Object
  extended by org.jcodec.containers.mkv.ebml.Element
      extended by org.jcodec.containers.mkv.ebml.BinaryElement
          extended by org.jcodec.containers.mkv.ebml.SignedIntegerElement
Direct Known Subclasses:
DateElement

public class SignedIntegerElement
extends BinaryElement

Basic class for the Signed Integer EBML data type.

Author:
John Cannon

Field Summary
static long[] signedComplement
           
 
Fields inherited from class org.jcodec.containers.mkv.ebml.Element
data, dataOffset, dataRead, id, offset, parent, size, type
 
Constructor Summary
SignedIntegerElement(byte[] typeID)
           
 
Method Summary
static byte[] convertToBytes(long val)
           
static long convertToUnsigned(long val)
           
static int getSerializedSize(long val)
          TODO: This should be replaces with a straight-forward calculation
 long getValue()
           
 void setValue(long value)
           
 
Methods inherited from class org.jcodec.containers.mkv.ebml.BinaryElement
getData, setData
 
Methods inherited from class org.jcodec.containers.mkv.ebml.Element
ebmlBytes, ebmlBytes, getEbmlSize, getId, getSize, isSameEbmlId, isSameMatroskaType, mux, mux, readData, setParent, skipData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

signedComplement

public static final long[] signedComplement
Constructor Detail

SignedIntegerElement

public SignedIntegerElement(byte[] typeID)
Method Detail

setValue

public void setValue(long value)

getValue

public long getValue()

getSerializedSize

public static int getSerializedSize(long val)
TODO: This should be replaces with a straight-forward calculation

Parameters:
val -
Returns:

convertToUnsigned

public static long convertToUnsigned(long val)

convertToBytes

public static byte[] convertToBytes(long val)


Copyright © 2013. All Rights Reserved.