|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectto.etc.util.ByteArrayUtil
public final class ByteArrayUtil
Method Summary | |
---|---|
static int |
compare(byte[] a,
int astart,
byte[] b,
int bstart,
int len)
|
static int |
compare(byte[] a,
int from,
int to,
byte[] b)
Compares a byte array part with an array. |
static int |
findKey(java.util.List<byte[]> v,
int start,
byte[] key)
Find a key by means of a binary search. |
static int |
getInt(byte[] ba,
int offset)
Returns an integer packed into a byte array. |
static long |
getLong(byte[] ba,
int offset)
Return a long value from bytearray "ar" starting at the offset "offset". |
static short |
getShort(byte[] ba,
int offset)
|
static java.lang.String |
getString(byte[] ar,
int offset,
int length)
Returns a string from the thingy. |
static java.sql.Timestamp |
getTimestamp(byte[] ar,
int offset)
Return a Timestamp value from bytearray "ar" starting at the offset "offset". |
static void |
setInt(byte[] ba,
int offset,
int val)
|
static void |
setLong(byte[] ba,
int offset,
long val)
Put a long value "val" in a byte array "ba" starting at the offset "offset" |
static void |
setShort(byte[] ba,
int offset,
short val)
|
static void |
setString(byte[] ba,
int offset,
java.lang.String s,
int length)
Sets a string converted to 8-bit ascii into an array. |
static void |
setTimestamp(byte[] ba,
int offset,
java.sql.Timestamp val)
Put a Timestamp value "val" in a byte array "ba" starting at the offset "offset" |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void setLong(byte[] ba, int offset, long val)
ba
- offset
- val
- public static long getLong(byte[] ba, int offset)
ar
- offset
- length
-
public static void setTimestamp(byte[] ba, int offset, java.sql.Timestamp val)
ba
- offset
- val
- public static java.sql.Timestamp getTimestamp(byte[] ar, int offset)
ar
- offset
- length
-
public static void setShort(byte[] ba, int offset, short val)
public static short getShort(byte[] ba, int offset)
public static void setInt(byte[] ba, int offset, int val)
public static int getInt(byte[] ba, int offset)
public static void setString(byte[] ba, int offset, java.lang.String s, int length)
public static java.lang.String getString(byte[] ar, int offset, int length)
public static int compare(byte[] a, int from, int to, byte[] b)
public static int compare(byte[] a, int astart, byte[] b, int bstart, int len)
public static int findKey(java.util.List<byte[]> v, int start, byte[] key)
v
- vector containing the element to search forstart
- location where to start comparing the byteskey
- The key to look for.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |