|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjlibrtp.StaticProcs
public class StaticProcs
Generic functions for converting between unsigned integers and byte[]s.
Constructor Summary | |
---|---|
StaticProcs()
|
Method Summary | |
---|---|
static java.lang.String |
bitsOfByte(byte aByte)
Get the bits of a byte |
static java.lang.String |
bitsOfBytes(byte[] bytes)
|
static byte |
byteOfHex(byte[] hex)
Get the hex representation of a byte |
static int |
bytesToUIntInt(byte[] bytes,
int index)
Combines two bytes (most significant bit first) into a 16 bit unsigned integer. |
static long |
bytesToUIntLong(byte[] bytes,
int index)
Combines four bytes (most significant bit first) into a 32 bit unsigned integer. |
static java.lang.String |
hexOfByte(byte aByte)
Get the hex representation of a byte |
static void |
printBits(byte aByte)
Print the bits of a byte to standard out. |
static byte[] |
uIntIntToByteWord(int i)
Converts an integer into an array of bytes. |
static byte[] |
uIntLongToByteWord(long j)
Converts an unsigned 32 bit integer, stored in a long, into an array of bytes. |
static long |
undoNtpMess(long ntpTs1,
long ntpTs2)
Recreates a UNIX timestamp based on the NTP representation used in RTCP SR packets |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StaticProcs()
Method Detail |
---|
public static byte[] uIntIntToByteWord(int i)
i
- a 16 bit unsigned integer in an int
public static byte[] uIntLongToByteWord(long j)
j
- a long
public static int bytesToUIntInt(byte[] bytes, int index)
index
- of most significant byte
public static long bytesToUIntLong(byte[] bytes, int index)
bytes
- index
- of most significant byte
public static long undoNtpMess(long ntpTs1, long ntpTs2)
ntpTs1
- from RTCP SR packetntpTs2
- from RTCP SR packet
public static java.lang.String bitsOfByte(byte aByte)
aByte
- the byte you wish to convert
public static java.lang.String hexOfByte(byte aByte)
aByte
- the byte you wish to convert
public static byte byteOfHex(byte[] hex)
hex
- 4 bytes the byte you wish to convert
public static void printBits(byte aByte)
aByte
- the byte you wish to print out.public static java.lang.String bitsOfBytes(byte[] bytes)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |