## org.red5.io.object
Class UnsignedNumber

    java.lang.Object
      java.lang.Number
          org.red5.io.object.UnsignedNumber

All Implemented Interfaces:
  Serializable

Direct Known Subclasses:
  UnsignedByte, UnsignedInt, UnsignedLong, UnsignedShort

    public abstract class UnsignedNumber

extends Number

Author:
  Matteo Merli (matteo.merli@gmail.com)
See Also:
  Serialized Form

Field Summary
`protected static char[]` `hexLetters`

Constructor Summary
`UnsignedNumber()`

Method Summary
`abstract int` `compareTo(UnsignedNumber other)`
`abstract boolean` `equals(Object other)`
`abstract byte[]` `getBytes()` Get a byte array representation of the number.
`abstract int` `hashCode()`
`abstract void` `shiftLeft(int nBits)` Perform a bit left shift of the value.
`abstract void` `shiftRight(int nBits)` Perform a bit right shift of the value.
`String` `toHexString()`
`String` `toHexString(boolean pad)`
`abstract String` `toString()`

Methods inherited from class java.lang.Number
`byteValue, doubleValue, floatValue, intValue, longValue, shortValue`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### hexLetters

    protected static final char[] hexLetters

Constructor Detail

### UnsignedNumber

    public UnsignedNumber()

Method Detail

### getBytes

    public abstract byte[] getBytes()

  Get a byte array representation of the number. The order will be MSB first (Big Endian).

  Returns:
    the serialized number

### shiftRight

    public abstract void shiftRight(int nBits)

  Perform a bit right shift of the value.

  Parameters:
    `nBits` - the number of positions to shift

### shiftLeft

    public abstract void shiftLeft(int nBits)

  Perform a bit left shift of the value.

  Parameters:
    `nBits` - the number of positions to shift

### toString

    public abstract String toString()

  Overrides:
    `toString` in class `Object`

### compareTo

    public abstract int compareTo(UnsignedNumber other)

### equals

    public abstract boolean equals(Object other)

  Overrides:
    `equals` in class `Object`

### hashCode

    public abstract int hashCode()

  Overrides:
    `hashCode` in class `Object`

### toHexString

    public String toHexString()

### toHexString

    public String toHexString(boolean pad)

Copyright © 2006-2010 The Red5 Project