com.cometway.util
Class ByteTools
java.lang.Object
com.cometway.util.ByteTools
public class ByteTools
- extends java.lang.Object
|
Method Summary |
static double |
bytesToDouble(byte[] bytes)
|
static double |
bytesToDouble(byte[] bytes,
int offset)
|
static float |
bytesToFloat(byte[] bytes)
|
static float |
bytesToFloat(byte[] bytes,
int offset)
|
static int |
bytesToInt(byte[] bytes)
|
static int |
bytesToInt(byte[] bytes,
int offset)
|
static long |
bytesToLong(byte[] bytes)
|
static long |
bytesToLong(byte[] bytes,
int offset)
|
static byte[] |
doubleToBytes(double d)
|
static byte[] |
floatToBytes(float f)
|
static void |
insertDouble(double d,
byte[] bytes,
int offset)
|
static void |
insertFloat(float f,
byte[] bytes,
int offset)
|
static void |
insertInt(int integer,
byte[] bytes,
int offset)
|
static void |
insertLong(long l,
byte[] bytes,
int offset)
|
static byte[] |
intToBytes(int integer)
|
static byte[] |
longToBytes(long l)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ByteTools
public ByteTools()
intToBytes
public static byte[] intToBytes(int integer)
insertInt
public static void insertInt(int integer,
byte[] bytes,
int offset)
bytesToInt
public static int bytesToInt(byte[] bytes,
int offset)
bytesToInt
public static int bytesToInt(byte[] bytes)
longToBytes
public static byte[] longToBytes(long l)
insertLong
public static void insertLong(long l,
byte[] bytes,
int offset)
bytesToLong
public static long bytesToLong(byte[] bytes,
int offset)
bytesToLong
public static long bytesToLong(byte[] bytes)
floatToBytes
public static byte[] floatToBytes(float f)
insertFloat
public static void insertFloat(float f,
byte[] bytes,
int offset)
bytesToFloat
public static float bytesToFloat(byte[] bytes,
int offset)
bytesToFloat
public static float bytesToFloat(byte[] bytes)
doubleToBytes
public static byte[] doubleToBytes(double d)
insertDouble
public static void insertDouble(double d,
byte[] bytes,
int offset)
bytesToDouble
public static double bytesToDouble(byte[] bytes,
int offset)
bytesToDouble
public static double bytesToDouble(byte[] bytes)