|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectme.edwards.des.util.ByteUtil
public class ByteUtil
Utility class for converting Java data structures and primitives into byte
arrays, or hexadecimal Strings, or vice-versa.
Created on: Oct 17, 2015 at 9:21:05 AM
Constructor Summary | |
---|---|
ByteUtil()
|
Method Summary | |
---|---|
static java.lang.String |
bytesToHex(byte[] bytes)
Converts a byte array into a hexadecimal String |
static int |
bytesToInt(byte[] bytes)
Converts a byte array into an integer |
static byte[] |
hexToBytes(java.lang.String hex)
Converts a hexadecimal String into a byte array |
static byte[] |
intToBytes(int i)
Converts an integer into a byte array |
static byte[] |
longToBytes(long l)
Converts a long integer into a byte array |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ByteUtil()
Method Detail |
---|
public static byte[] intToBytes(int i)
i
- Integer to convert
public static int bytesToInt(byte[] bytes)
bytes
- Byte array to convert
public static byte[] longToBytes(long l)
l
- Long integer to convert
public static byte[] hexToBytes(java.lang.String hex)
hex
- Hex String to convert
public static java.lang.String bytesToHex(byte[] bytes)
bytes
- Byte array to convert
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |