com.gcapmedia.dab.epg.binary
Class BitrateType
java.lang.Object
com.gcapmedia.dab.epg.binary.BitrateType
- All Implemented Interfaces:
- Encodable
public class BitrateType
- extends java.lang.Object
- implements Encodable
Encoded service/programme bitrate. Encoded as a 16-bit unsigned
integer that is multipled by 0.1 to give the bitrate rounded up
to the nearest 100bps above the expected average bit rate in kbps.
For example, a 192 kbps channel is 192000 bps, so the bitrate will
be encoded as 1920. A 0.56kbps channel would be encoded as 6.
Constructor Summary |
BitrateType(int bitrate)
Create a new bitrate type |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
BitrateType
public BitrateType(int bitrate)
- Create a new bitrate type
- Parameters:
bitrate
- Bitrate in bps
getBitrate
public int getBitrate()
- Returns:
- Returns the bitrate in bps
fromBytes
public static BitrateType fromBytes(byte[] bytes)
- Parse the type from its byte array representation
getBytes
public byte[] getBytes()
- Specified by:
getBytes
in interface Encodable
- Returns:
- Returns the data as bytes
- See Also:
Encodable.getBytes()
getLength
public int getLength()
- Specified by:
getLength
in interface Encodable
- Returns:
- Returns the length of this data
- See Also:
Encodable.getLength()
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
- See Also:
Object.equals(java.lang.Object)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
- See Also:
Object.toString()
Copyright © 2007. All Rights Reserved.