fm.liveswitch.matroska.Ebml Class Reference

A Matroska EBML element. More...

Public Member Functions

 Ebml ()
 Initializes a new instance of the fm.liveswitch.matroska.Ebml class. More...
 
 Ebml (byte[] bytes)
 Initializes a new instance of the fm.liveswitch.matroska.Ebml class. More...
 
String getDocType ()
 Gets the document type. More...
 
long getDocTypeReadVersion ()
 Gets the document type read version. More...
 
long getDocTypeVersion ()
 Gets the document type version. More...
 
long getEbmlMaxIdLength ()
 Gets the EBML maximum identifier length. More...
 
long getEbmlMaxSizeLength ()
 Gets the EBML maximum size length. More...
 
long getEbmlReadVersion ()
 Gets the EBML read version. More...
 
long getEbmlVersion ()
 Gets the EBML version. More...
 
byte[] getId ()
 Gets the EBML ID. More...
 
void merge (fm.liveswitch.matroska.Ebml ebml)
 Merges another fm.liveswitch.matroska.Ebml into this one. More...
 
void setDocType (String value)
 Sets the document type. More...
 
void setDocTypeReadVersion (long value)
 Sets the document type read version. More...
 
void setDocTypeVersion (long value)
 Sets the document type version. More...
 
void setEbmlMaxIdLength (long value)
 Sets the EBML maximum identifier length. More...
 
void setEbmlMaxSizeLength (long value)
 Sets the EBML maximum size length. More...
 
void setEbmlReadVersion (long value)
 Sets the EBML read version. More...
 
void setEbmlVersion (long value)
 Sets the EBML version. More...
 
- Public Member Functions inherited from fm.liveswitch.matroska.Element
byte[] getBytes ()
 Serializes to a byte array. More...
 
int getLength ()
 Gets the total length of the element (including ID/size field), set after calling fm.liveswitch.matroska.Element#getBytes. More...
 
int getSize ()
 Gets the size of the element (excluding ID/size field), set after calling fm.liveswitch.matroska.Element#getBytes. More...
 
int getSizeLength ()
 Gets the length of the size field, in bytes. More...
 
boolean getWriteDefaultValues ()
 Gets whether to include default values when serializing. More...
 
void setSizeLength (int value)
 Sets the length of the size field, in bytes. More...
 
void setWriteDefaultValues (boolean value)
 Sets whether to include default values when serializing. More...
 

Static Public Member Functions

static String getDefaultDocType ()
 Gets the default document type. More...
 
static long getDefaultDocTypeReadVersion ()
 Gets the default document type read version. More...
 
static long getDefaultDocTypeVersion ()
 Gets the default document type version. More...
 
static long getDefaultEbmlMaxIdLength ()
 Gets the default EBML maximum identifier length. More...
 
static long getDefaultEbmlMaxSizeLength ()
 Gets the default EBML maximum size length. More...
 
static long getDefaultEbmlReadVersion ()
 Gets the default EBML read version. More...
 
static long getDefaultEbmlVersion ()
 Gets the default EBML version. More...
 
static byte[] getEbmlId ()
 Gets the EBML ID. More...
 
- Static Public Member Functions inherited from fm.liveswitch.matroska.Element
static boolean compare (byte[] bytes1, byte[] bytes2)
 Compares two byte arrays for equality. More...
 
static boolean readBool (byte[] value)
 Reads a boolean element from the stream. More...
 
static java.util.Date readDate (byte[] value)
 Reads a date string element from the stream. More...
 
static double readDouble (byte[] value)
 Reads a double element from the stream. More...
 
static float readFloat (byte[] value)
 Reads a float element from the stream. More...
 
static fm.liveswitch.Guid readGuid (byte[] value)
 Reads a GUID element from the stream. More...
 
static byte[] readId (byte[] bytes, int offset, fm.liveswitch.IntegerHolder offsetPlus)
 Reads a binary ID from the stream. More...
 
static long readSignedInteger (byte[] value)
 Reads a signed integer element from the byte array. More...
 
static String readString (byte[] value)
 Reads an ASCII string element from the stream. More...
 
static long readUnsignedInteger (byte[] value)
 Reads an unsigned integer element from the byte array. More...
 
static String readUtf8 (byte[] value)
 Reads a UTF-8 string element from the stream. More...
 
static byte[] readValue (byte[] bytes, int offset, fm.liveswitch.IntegerHolder offsetPlus)
 Reads a binary value from the stream. More...
 
static long readVariableInteger (byte[] bytes, int offset, fm.liveswitch.IntegerHolder offsetPlus)
 Reads a variable integer ("vint") from the byte array. More...
 
static byte[] serializeVariableInteger (long value)
 Serializes a variable integer. More...
 
static byte[] serializeVariableInteger (long value, int length)
 Serializes a variable integer using a fixed length. More...
 

Protected Member Functions

byte[] getInnerBytes ()
 Gets the inner bytes. More...
 
- Protected Member Functions inherited from fm.liveswitch.matroska.Element
 Element ()
 
void write (byte[] value, byte[] idValue, fm.liveswitch.ByteOutputStream stream)
 Writes a binary element to the stream. More...
 
void writeBool (boolean value, byte[] idValue, fm.liveswitch.ByteOutputStream stream)
 Writes a boolean element to the stream. More...
 
void writeDate (java.util.Date value, byte[] idValue, fm.liveswitch.ByteOutputStream stream)
 Writes a date element to the stream. More...
 
void writeDouble (double value, byte[] idValue, fm.liveswitch.ByteOutputStream stream)
 Writes a double element to the stream. More...
 
void writeFloat (float value, byte[] idValue, fm.liveswitch.ByteOutputStream stream)
 Writes a float element to the stream. More...
 
void writeGuid (fm.liveswitch.Guid value, byte[] idValue, fm.liveswitch.ByteOutputStream stream)
 Writes a GUID element to the stream. More...
 
void writeSignedInteger (long value, byte[] idValue, fm.liveswitch.ByteOutputStream stream)
 Writes an signed integer element to the stream. More...
 
void writeString (String value, byte[] idValue, fm.liveswitch.ByteOutputStream stream)
 Writes an ASCII string element to the stream. More...
 
void writeUnsignedInteger (long value, byte[] idValue, fm.liveswitch.ByteOutputStream stream)
 Writes an unsigned integer element to the stream. More...
 
void writeUtf8 (String value, byte[] idValue, fm.liveswitch.ByteOutputStream stream)
 Writes a UTF-8 string element to the stream. More...
 
void writeVariableInteger (long value, fm.liveswitch.ByteOutputStream stream)
 Writes a variable integer ("vint") to the stream. More...
 
void writeVariableInteger (long value, fm.liveswitch.ByteOutputStream stream, int length)
 Writes a variable integer ("vint") to the stream using a fixed length. More...
 

Detailed Description

A Matroska EBML element.

Constructor & Destructor Documentation

◆ Ebml() [1/2]

fm.liveswitch.matroska.Ebml.Ebml ( )

Initializes a new instance of the fm.liveswitch.matroska.Ebml class.

◆ Ebml() [2/2]

fm.liveswitch.matroska.Ebml.Ebml ( byte[]  bytes)

Initializes a new instance of the fm.liveswitch.matroska.Ebml class.

Parameters
bytesThe bytes.

Member Function Documentation

◆ getDefaultDocType()

static String fm.liveswitch.matroska.Ebml.getDefaultDocType ( )
static

Gets the default document type.

◆ getDefaultDocTypeReadVersion()

static long fm.liveswitch.matroska.Ebml.getDefaultDocTypeReadVersion ( )
static

Gets the default document type read version.

◆ getDefaultDocTypeVersion()

static long fm.liveswitch.matroska.Ebml.getDefaultDocTypeVersion ( )
static

Gets the default document type version.

◆ getDefaultEbmlMaxIdLength()

static long fm.liveswitch.matroska.Ebml.getDefaultEbmlMaxIdLength ( )
static

Gets the default EBML maximum identifier length.

◆ getDefaultEbmlMaxSizeLength()

static long fm.liveswitch.matroska.Ebml.getDefaultEbmlMaxSizeLength ( )
static

Gets the default EBML maximum size length.

◆ getDefaultEbmlReadVersion()

static long fm.liveswitch.matroska.Ebml.getDefaultEbmlReadVersion ( )
static

Gets the default EBML read version.

◆ getDefaultEbmlVersion()

static long fm.liveswitch.matroska.Ebml.getDefaultEbmlVersion ( )
static

Gets the default EBML version.

◆ getDocType()

String fm.liveswitch.matroska.Ebml.getDocType ( )

Gets the document type.

◆ getDocTypeReadVersion()

long fm.liveswitch.matroska.Ebml.getDocTypeReadVersion ( )

Gets the document type read version.

◆ getDocTypeVersion()

long fm.liveswitch.matroska.Ebml.getDocTypeVersion ( )

Gets the document type version.

◆ getEbmlId()

static byte [] fm.liveswitch.matroska.Ebml.getEbmlId ( )
static

Gets the EBML ID.

◆ getEbmlMaxIdLength()

long fm.liveswitch.matroska.Ebml.getEbmlMaxIdLength ( )

Gets the EBML maximum identifier length.

◆ getEbmlMaxSizeLength()

long fm.liveswitch.matroska.Ebml.getEbmlMaxSizeLength ( )

Gets the EBML maximum size length.

◆ getEbmlReadVersion()

long fm.liveswitch.matroska.Ebml.getEbmlReadVersion ( )

Gets the EBML read version.

◆ getEbmlVersion()

long fm.liveswitch.matroska.Ebml.getEbmlVersion ( )

Gets the EBML version.

◆ getId()

byte [] fm.liveswitch.matroska.Ebml.getId ( )

Gets the EBML ID.

Reimplemented from fm.liveswitch.matroska.Element.

◆ getInnerBytes()

byte [] fm.liveswitch.matroska.Ebml.getInnerBytes ( )
protected

Gets the inner bytes.

Reimplemented from fm.liveswitch.matroska.Element.

◆ merge()

void fm.liveswitch.matroska.Ebml.merge ( fm.liveswitch.matroska.Ebml  ebml)

Merges another fm.liveswitch.matroska.Ebml into this one.

Parameters
ebmlThe fm.liveswitch.matroska.Ebml.

◆ setDocType()

void fm.liveswitch.matroska.Ebml.setDocType ( String  value)

Sets the document type.

◆ setDocTypeReadVersion()

void fm.liveswitch.matroska.Ebml.setDocTypeReadVersion ( long  value)

Sets the document type read version.

◆ setDocTypeVersion()

void fm.liveswitch.matroska.Ebml.setDocTypeVersion ( long  value)

Sets the document type version.

◆ setEbmlMaxIdLength()

void fm.liveswitch.matroska.Ebml.setEbmlMaxIdLength ( long  value)

Sets the EBML maximum identifier length.

◆ setEbmlMaxSizeLength()

void fm.liveswitch.matroska.Ebml.setEbmlMaxSizeLength ( long  value)

Sets the EBML maximum size length.

◆ setEbmlReadVersion()

void fm.liveswitch.matroska.Ebml.setEbmlReadVersion ( long  value)

Sets the EBML read version.

◆ setEbmlVersion()

void fm.liveswitch.matroska.Ebml.setEbmlVersion ( long  value)

Sets the EBML version.