Class MatroskaElement
- java.lang.Object
-
- com.sedmelluq.discord.lavaplayer.container.matroska.format.MatroskaElement
-
- Direct Known Subclasses:
MutableMatroskaElement
public class MatroskaElement extends java.lang.ObjectMatroska container element.
-
-
Field Summary
Fields Modifier and Type Field Description protected intdataSizeprotected intheaderSizeprotected longidprotected intlevelprotected longpositionprotected MatroskaElementTypetype
-
Constructor Summary
Constructors Modifier Constructor Description protectedMatroskaElement(int level)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MatroskaElementfrozen()longgetDataPosition()intgetDataSize()intgetHeaderSize()longgetId()intgetLevel()longgetPosition()longgetRemaining(long currentPosition)MatroskaElementTypegetType()booleanis(MatroskaElementType type)booleanis(MatroskaElementType.DataType dataType)
-
-
-
Field Detail
-
level
protected final int level
-
id
protected long id
-
type
protected MatroskaElementType type
-
position
protected long position
-
headerSize
protected int headerSize
-
dataSize
protected int dataSize
-
-
Method Detail
-
getLevel
public int getLevel()
- Returns:
- The depth of the element in the element tree.
-
getId
public long getId()
- Returns:
- The EBML code of the element.
-
getType
public MatroskaElementType getType()
- Returns:
- Element type, Unknown if not listed in the enum.
-
getPosition
public long getPosition()
- Returns:
- Absolute position of the element in the file.
-
getHeaderSize
public int getHeaderSize()
- Returns:
- Size of the header in bytes.
-
getDataSize
public int getDataSize()
- Returns:
- Size of the payload in bytes.
-
is
public boolean is(MatroskaElementType type)
- Parameters:
type- Element type.- Returns:
- True if this element is of the specified type.
-
is
public boolean is(MatroskaElementType.DataType dataType)
- Parameters:
dataType- Element data type.- Returns:
- True if the type of the element uses the specified data type.
-
getRemaining
public long getRemaining(long currentPosition)
- Parameters:
currentPosition- Absolute position to check against.- Returns:
- The number of bytes from the specified position to the end of this element.
-
getDataPosition
public long getDataPosition()
- Returns:
- The absolute position of the data of this element.
-
frozen
public MatroskaElement frozen()
- Returns:
- A frozen version of the element safe to keep for later use.
-
-