org.red5.io.object
Class UnsignedInt
java.lang.Object
java.lang.Number
org.red5.io.object.UnsignedNumber
org.red5.io.object.UnsignedInt
- All Implemented Interfaces:
- Serializable
public final class UnsignedInt
- extends UnsignedNumber
The UnsignedInt class wraps a value of an unsigned 32 bits number.
- Author:
- Matteo Merli ([email protected])
- See Also:
- Serialized Form
UnsignedInt
public UnsignedInt(byte c)
UnsignedInt
public UnsignedInt(short c)
UnsignedInt
public UnsignedInt(int c)
UnsignedInt
public UnsignedInt(long c)
fromBytes
public static UnsignedInt fromBytes(byte[] c)
fromBytes
public static UnsignedInt fromBytes(byte[] c,
int idx)
fromString
public static UnsignedInt fromString(String c)
fromString
public static UnsignedInt fromString(String c,
int radix)
doubleValue
public double doubleValue()
- Specified by:
doubleValue
in class Number
floatValue
public float floatValue()
- Specified by:
floatValue
in class Number
intValue
public int intValue()
- Specified by:
intValue
in class Number
longValue
public long longValue()
- Specified by:
longValue
in class Number
getBytes
public byte[] getBytes()
- Description copied from class:
UnsignedNumber
- Get a byte array representation of the number. The order will be MSB
first (Big Endian).
- Specified by:
getBytes
in class UnsignedNumber
- Returns:
- the serialized number
compareTo
public int compareTo(UnsignedNumber other)
- Specified by:
compareTo
in class UnsignedNumber
equals
public boolean equals(Object other)
- Specified by:
equals
in class UnsignedNumber
toString
public String toString()
- Specified by:
toString
in class UnsignedNumber
hashCode
public int hashCode()
- Specified by:
hashCode
in class UnsignedNumber
shiftRight
public void shiftRight(int nBits)
- Description copied from class:
UnsignedNumber
- Perform a bit right shift of the value.
- Specified by:
shiftRight
in class UnsignedNumber
- Parameters:
nBits
- the number of positions to shift
shiftLeft
public void shiftLeft(int nBits)
- Description copied from class:
UnsignedNumber
- Perform a bit left shift of the value.
- Specified by:
shiftLeft
in class UnsignedNumber
- Parameters:
nBits
- the number of positions to shift
Copyright © 2006-2012 The Red5 Project