issrg.SAWS
Class utility
java.lang.Object
issrg.SAWS.utility
public class utility
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
utility
public utility()
intToByte
public static byte intToByte(int value)
byteToInt
public static int byteToInt(byte b)
longToByteArray
public static byte[] longToByteArray(long value)
byteArrayToLong
public static long byteArrayToLong(byte[] b)
byteArrayToLong
public static long byteArrayToLong(byte[] b,
int offset)
- Convert the byte array to a long starting from the given offset.
- Parameters:
b
- The byte arrayoffset
- The array offset
- Returns:
- The long
intToByteArray
public static byte[] intToByteArray(int value)
byteArrayToInt
public static int byteArrayToInt(byte[] b)
- Convert the byte array to an int.
- Parameters:
b
- The byte array
- Returns:
- The integer
byteArrayToInt
public static int byteArrayToInt(byte[] b,
int offset)
- Convert the byte array to an int starting from the given offset.
- Parameters:
b
- The byte array, b[0] is the highest digitoffset
- The array offset
- Returns:
- The integer
byte2hex
public static java.lang.String byte2hex(byte b)
byte2hex
public static void byte2hex(byte b,
java.lang.StringBuffer buf)
toHexString
public static java.lang.String toHexString(byte[] block)