|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jboss.soa.esb.nagios.util.ByteOps
public class ByteOps
Byte manipulation utility methods
| Constructor Summary | |
|---|---|
ByteOps()
|
|
| Method Summary | |
|---|---|
static int |
bytesToInt(byte[] b,
int offset,
int size)
Convert portion of an array of bytes into an int |
static void |
copyIntoArray(byte[] src,
byte[] dst,
int offset,
int length,
boolean terminator)
Convert a long to some number of bytes and store them in an array. |
static byte[] |
intToBytes(int num,
int len,
byte[] b,
int offset)
Convert an int to some number of bytes and store them in an array. |
static byte[] |
longToBytes(long num,
int len,
byte[] b,
int offset)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ByteOps()
| Method Detail |
|---|
public static int bytesToInt(byte[] b,
int offset,
int size)
b - byte array containing dataoffset - offset into array to start conversionsize - number of bytes in array to use for conversion
public static byte[] intToBytes(int num,
int len,
byte[] b,
int offset)
num - number to convertlen - length of bytes to useb - array to store value into (optional, if null one will be created)offset - position in array to store into
public static final byte[] longToBytes(long num,
int len,
byte[] b,
int offset)
public static void copyIntoArray(byte[] src,
byte[] dst,
int offset,
int length,
boolean terminator)
num - number to convertlen - length of bytes to useb - array to store value into (optional, if null one will be created)offset - position in array to store into
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||