ByteUtil

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.ctdp.rfdynhud.gamedata
Class ByteUtil

    java.lang.Object
      net.ctdp.rfdynhud.gamedata.ByteUtil

    public class ByteUtil

extends java.lang.Object

Static methods to read primitive types from a byte array.

Author:
  Marvin Froehlich (CTDP)

Field Summary
`static int` | `SHIFT_HHH`
`static int` | `SHIFT_HHL`
`static int` | `SHIFT_HLH`
`static int` | `SHIFT_HLL`
`static int` | `SHIFT2_H`
`static int` | `SHIFT2_L`
`static int` | `SHIFT4_HH`
`static int` | `SHIFT4_HL`
`static int` | `SHIFT4_LH`
`static int` | `SHIFT4_LL`
`static int` | `SIZE_BOOL`
`static int` | `SIZE_CHAR`
`static int` | `SIZE_DOUBLE`
`static int` | `SIZE_FLOAT`
`static int` | `SIZE_INT`
`static int` | `SIZE_LONG`
`static int` | `SIZE_POINTER`
`static int` | `SIZE_SHORT`
`static int` | `SIZE_VECTOR3`

Constructor Summary
`ByteUtil()`

Method Summary
`static boolean` | `readBoolean(byte[] buffer, int offset)`
`static byte` | `readByte(byte[] buffer, int offset)`
`static double` | `readDouble(byte[] buffer, int offset)`
`static float` | `readFloat(byte[] buffer, int offset)`
`static int` | `readInt(byte[] buffer, int offset)`
`static long` | `readLong(byte[] buffer, int offset)`
`static short` | `readShort(byte[] buffer, int offset)`
`static java.lang.String` | `readString(byte[] buffer, int offset, int maxLength)`
`static short` | `readUnsignedByte(byte[] buffer, int offset)`
`static long` | `readUnsignedInt(byte[] buffer, int offset)`
`static int` | `readUnsignedShort(byte[] buffer, int offset)`
`static void` | `readVector(byte[] buffer, int offset, TelemVect3 vector)`

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

Field Detail

### SIZE_BOOL

    public static final int SIZE_BOOL

See Also:
  Constant Field Values

### SIZE_CHAR

    public static final int SIZE_CHAR

See Also:
  Constant Field Values

### SIZE_SHORT

    public static final int SIZE_SHORT

See Also:
  Constant Field Values

### SIZE_INT

    public static final int SIZE_INT

See Also:
  Constant Field Values

### SIZE_LONG

    public static final int SIZE_LONG

See Also:
  Constant Field Values

### SIZE_FLOAT

    public static final int SIZE_FLOAT

See Also:
  Constant Field Values

### SIZE_DOUBLE

    public static final int SIZE_DOUBLE

See Also:
  Constant Field Values

### SIZE_POINTER

    public static final int SIZE_POINTER

See Also:
  Constant Field Values

### SIZE_VECTOR3

    public static final int SIZE_VECTOR3

See Also:
  Constant Field Values

### SHIFT4_HH

    public static final int SHIFT4_HH

See Also:
  Constant Field Values

### SHIFT4_HL

    public static final int SHIFT4_HL

See Also:
  Constant Field Values

### SHIFT4_LH

    public static final int SHIFT4_LH

See Also:
  Constant Field Values

### SHIFT4_LL

    public static final int SHIFT4_LL

See Also:
  Constant Field Values

### SHIFT2_H

    public static final int SHIFT2_H

See Also:
  Constant Field Values

### SHIFT2_L

    public static final int SHIFT2_L

See Also:
  Constant Field Values

### SHIFT_HHH

    public static final int SHIFT_HHH

See Also:
  Constant Field Values

### SHIFT_HHL

    public static final int SHIFT_HHL

See Also:
  Constant Field Values

### SHIFT_HLH

    public static final int SHIFT_HLH

See Also:
  Constant Field Values

### SHIFT_HLL

    public static final int SHIFT_HLL

See Also:
  Constant Field Values

Constructor Detail

### ByteUtil

    public ByteUtil()

Method Detail

### readByte

    public static final byte readByte(byte[] buffer,
                                      int offset)

### readUnsignedByte

    public static final short readUnsignedByte(byte[] buffer,
                                               int offset)

### readBoolean

    public static final boolean readBoolean(byte[] buffer,
                                            int offset)

### readShort

    public static final short readShort(byte[] buffer,
                                        int offset)

### readUnsignedShort

    public static final int readUnsignedShort(byte[] buffer,
                                              int offset)

### readInt

    public static final int readInt(byte[] buffer,
                                    int offset)

### readUnsignedInt

    public static final long readUnsignedInt(byte[] buffer,
                                             int offset)

### readLong

    public static final long readLong(byte[] buffer,
                                      int offset)

### readFloat

    public static final float readFloat(byte[] buffer,
                                        int offset)

### readDouble

    public static final double readDouble(byte[] buffer,
                                          int offset)

### readVector

    public static final void readVector(byte[] buffer,
                                        int offset,
                                        TelemVect3 vector)

### readString

    public static final java.lang.String readString(byte[] buffer,
                                                    int offset,
                                                    int maxLength)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD