pl.edu.pjwstk.yaod.util
Class Bits
java.lang.Object
|
+--pl.edu.pjwstk.yaod.util.Bits
- Direct Known Subclasses:
- NewBits
- public class Bits
- extends java.lang.Object
Utility methods for packing/unpacking primitive values in/out of byte arrays
using big-endian byte ordering.
Constructor Summary |
Bits()
|
Method Summary |
static boolean |
getBoolean(byte[] b,
int off)
|
static char |
getChar(byte[] b,
int off)
|
static double |
getDouble(byte[] b,
int off)
|
static float |
getFloat(byte[] b,
int off)
|
static int |
getInt(byte[] b,
int off)
|
static long |
getLong(byte[] b,
int off)
|
static short |
getShort(byte[] b,
int off)
|
static void |
putBoolean(byte[] b,
int off,
boolean val)
|
static void |
putChar(byte[] b,
int off,
char val)
|
static void |
putDouble(byte[] b,
int off,
double val)
|
static void |
putFloat(byte[] b,
int off,
float val)
|
static void |
putInt(byte[] b,
int off,
int val)
|
static void |
putLong(byte[] b,
int off,
long val)
|
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 |
Bits
public Bits()
getBoolean
public static boolean getBoolean(byte[] b,
int off)
getChar
public static char getChar(byte[] b,
int off)
getShort
public static short getShort(byte[] b,
int off)
getInt
public static int getInt(byte[] b,
int off)
getFloat
public static float getFloat(byte[] b,
int off)
getLong
public static long getLong(byte[] b,
int off)
getDouble
public static double getDouble(byte[] b,
int off)
putBoolean
public static void putBoolean(byte[] b,
int off,
boolean val)
putChar
public static void putChar(byte[] b,
int off,
char val)
putShort
public static void putShort(byte[] b,
int off,
short val)
putInt
public static void putInt(byte[] b,
int off,
int val)
putFloat
public static void putFloat(byte[] b,
int off,
float val)
putLong
public static void putLong(byte[] b,
int off,
long val)
putDouble
public static void putDouble(byte[] b,
int off,
double val)