Package org.red5.io.matroska.dtd
Class DateTag
- java.lang.Object
-
- org.red5.io.matroska.dtd.Tag
-
- org.red5.io.matroska.dtd.UnsignedIntegerTag
-
- org.red5.io.matroska.dtd.DateTag
-
public class DateTag extends UnsignedIntegerTag
http://matroska.org/technical/specs/index.html Date - signed 8 octets integer in nanoseconds with 0 indicating the precise beginning of the millennium (at 2001-01-01T00:00:00,000000000 UTC)
-
-
Field Summary
Fields Modifier and Type Field Description static longDELAYstatic longNANO_MULTIPLIER
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DategetDate()getter for value asDatevoidparse(InputStream inputStream)method to read and to parse tag from inputStream givenprotected voidputValue(ByteBuffer bb)method to store tag value toByteBuffergivenDateTagsetValue(Date value)setter for value, updates the size of this tagStringtoString()method to get "pretty" representedTag-
Methods inherited from class org.red5.io.matroska.dtd.UnsignedIntegerTag
getValue, setValue
-
-
-
-
Field Detail
-
NANO_MULTIPLIER
public static final long NANO_MULTIPLIER
- See Also:
- Constant Field Values
-
DELAY
public static final long DELAY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DateTag
public DateTag(String name, VINT id) throws IOException
Constructor- Parameters:
name- - the name of tag to be createdid- - the id of tag to be created- Throws:
IOException- - in case of IO error- See Also:
Tag(String, VINT)
-
DateTag
public DateTag(String name, VINT id, VINT size, InputStream inputStream) throws IOException
Constructor- Parameters:
name- - the name of tag to be createdid- - the id of tag to be createdsize- - the size of tag to be createdinputStream- - stream to read tag data from- Throws:
IOException- - in case of IO error- See Also:
Tag(String, VINT, VINT, InputStream)
-
-
Method Detail
-
parse
public void parse(InputStream inputStream) throws IOException
Description copied from class:Tagmethod to read and to parse tag from inputStream given- Overrides:
parsein classUnsignedIntegerTag- Parameters:
inputStream- - stream to parse tag data from- Throws:
IOException- - in case of any IO errors- See Also:
Tag.parse(InputStream)
-
putValue
protected void putValue(ByteBuffer bb) throws IOException
Description copied from class:Tagmethod to store tag value toByteBuffergiven- Overrides:
putValuein classUnsignedIntegerTag- Parameters:
bb- -ByteBufferto store value- Throws:
IOException- - in case of any IO errors- See Also:
Tag.putValue(ByteBuffer)
-
setValue
public DateTag setValue(Date value)
setter for value, updates the size of this tag- Parameters:
value- - value to be set- Returns:
- - this for chaining
-
toString
public String toString()
method to get "pretty" representedTag- Overrides:
toStringin classUnsignedIntegerTag
-
-