java.io
Class Bits

java.lang.Object
  extended byjava.io.Bits

class Bits
extends Object

Utility methods for packing/unpacking primitive values in/out of byte arrays using big-endian byte ordering.


Constructor Summary
(package private) Bits()
           
 
Method Summary
(package private) static boolean getBoolean(byte[] b, int off)
           
(package private) static char getChar(byte[] b, int off)
           
(package private) static double getDouble(byte[] b, int off)
           
(package private) static float getFloat(byte[] b, int off)
           
(package private) static int getInt(byte[] b, int off)
           
(package private) static long getLong(byte[] b, int off)
           
(package private) static short getShort(byte[] b, int off)
           
(package private) static void putBoolean(byte[] b, int off, boolean val)
           
(package private) static void putChar(byte[] b, int off, char val)
           
(package private) static void putDouble(byte[] b, int off, double val)
           
(package private) static void putFloat(byte[] b, int off, float val)
           
(package private) static void putInt(byte[] b, int off, int val)
           
(package private) static void putLong(byte[] b, int off, long val)
           
(package private) static void putShort(byte[] b, int off, short val)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Bits

Bits()
Method Detail

getBoolean

static boolean getBoolean(byte[] b,
                          int off)

getChar

static char getChar(byte[] b,
                    int off)

getShort

static short getShort(byte[] b,
                      int off)

getInt

static int getInt(byte[] b,
                  int off)

getFloat

static float getFloat(byte[] b,
                      int off)

getLong

static long getLong(byte[] b,
                    int off)

getDouble

static double getDouble(byte[] b,
                        int off)

putBoolean

static void putBoolean(byte[] b,
                       int off,
                       boolean val)

putChar

static void putChar(byte[] b,
                    int off,
                    char val)

putShort

static void putShort(byte[] b,
                     int off,
                     short val)

putInt

static void putInt(byte[] b,
                   int off,
                   int val)

putFloat

static void putFloat(byte[] b,
                     int off,
                     float val)

putLong

static void putLong(byte[] b,
                    int off,
                    long val)

putDouble

static void putDouble(byte[] b,
                      int off,
                      double val)