public class Bytes extends Object
| Modifier and Type | Field and Description |
|---|---|
static boolean |
BIG_ENDIAN |
static byte[] |
EMPTY_BYTES |
static boolean |
LITTLE_ENDIAN |
| Constructor and Description |
|---|
Bytes() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
add(byte[]... b) |
static byte[] |
add(byte[] b1,
int off1,
int len1,
byte[] b2,
int off2,
int len2) |
static byte[] |
clone(byte[] b) |
static String |
decodeLatin1(byte[] b)
Deprecated.
|
static String |
decodeLatin1(byte[] b,
int off,
int len)
Deprecated.
|
static String |
decodeUtf8(byte[] b)
Deprecated.
|
static String |
decodeUtf8(byte[] b,
int off,
int len)
Deprecated.
|
static void |
dump(PrintStream out,
byte[] b) |
static void |
dump(PrintStream out,
byte[] b,
int off,
int len) |
static void |
dump(PrintWriter out,
byte[] b) |
static void |
dump(PrintWriter out,
byte[] b,
int off,
int len) |
static byte[] |
encodeLatin1(String str)
Deprecated.
|
static byte[] |
encodeUtf8(String str)
Deprecated.
|
static boolean |
equals(byte[] b1,
byte[] b2) |
static boolean |
equals(byte[] b1,
int off1,
byte[] b2,
int off2,
int len) |
static byte[] |
fromBigInteger(BigInteger bi,
int len) |
static byte[] |
fromHex(String hex) |
static byte[] |
fromInt(int n) |
static byte[] |
fromInt(int n,
boolean bLittleEndian) |
static byte[] |
fromLong(long n) |
static byte[] |
fromLong(long n,
boolean bLittleEndian) |
static byte[] |
fromShort(int n) |
static byte[] |
fromShort(int n,
boolean bLittleEndian) |
static byte[] |
left(byte[] b,
int len) |
static byte[] |
random(int len) |
static byte[] |
right(byte[] b,
int len) |
static byte[] |
secureRandom(int len) |
static void |
setInt(int n,
byte[] b,
int off) |
static void |
setInt(int n,
byte[] b,
int off,
boolean bLittleEndian) |
static void |
setLong(long n,
byte[] b,
int off) |
static void |
setLong(long n,
byte[] b,
int off,
boolean bLittleEndian) |
static void |
setShort(int n,
byte[] b,
int off) |
static void |
setShort(int n,
byte[] b,
int off,
boolean bLittleEndian) |
static byte[] |
sub(byte[] b,
int off) |
static byte[] |
sub(byte[] b,
int off,
int len) |
static String |
toHexLower(byte[] b) |
static String |
toHexLower(byte[] b,
int off,
int len) |
static String |
toHexUpper(byte[] b) |
static String |
toHexUpper(byte[] b,
int off,
int len) |
static int |
toInt(byte[] b) |
static int |
toInt(byte[] b,
boolean bLittleEndian) |
static int |
toInt(byte[] b,
int off) |
static int |
toInt(byte[] b,
int off,
boolean bLittleEndian) |
static long |
toLong(byte[] b) |
static long |
toLong(byte[] b,
boolean bLittleEndian) |
static long |
toLong(byte[] b,
int off) |
static long |
toLong(byte[] b,
int off,
boolean bLittleEndian) |
static int |
toShort(byte[] b) |
static int |
toShort(byte[] b,
boolean bLittleEndian) |
static int |
toShort(byte[] b,
int off) |
static int |
toShort(byte[] b,
int off,
boolean bLittleEndian) |
static void |
xor(byte[] src1,
int src1Pos,
byte[] src2,
int src2Pos,
byte[] dest,
int destPos,
int length) |
static void |
xor(byte[] src,
int srcPos,
byte[] dest,
int destPos,
int length) |
public static final boolean BIG_ENDIAN
public static final boolean LITTLE_ENDIAN
public static final byte[] EMPTY_BYTES
public static byte[] fromHex(String hex)
public static String toHexUpper(byte[] b)
public static String toHexUpper(byte[] b, int off, int len)
public static String toHexLower(byte[] b)
public static String toHexLower(byte[] b, int off, int len)
public static byte[] fromShort(int n)
public static byte[] fromShort(int n,
boolean bLittleEndian)
public static void setShort(int n,
byte[] b,
int off)
public static void setShort(int n,
byte[] b,
int off,
boolean bLittleEndian)
public static byte[] fromInt(int n)
public static byte[] fromInt(int n,
boolean bLittleEndian)
public static void setInt(int n,
byte[] b,
int off)
public static void setInt(int n,
byte[] b,
int off,
boolean bLittleEndian)
public static byte[] fromLong(long n)
public static byte[] fromLong(long n,
boolean bLittleEndian)
public static void setLong(long n,
byte[] b,
int off)
public static void setLong(long n,
byte[] b,
int off,
boolean bLittleEndian)
public static int toShort(byte[] b)
public static int toShort(byte[] b,
boolean bLittleEndian)
public static int toShort(byte[] b,
int off)
public static int toShort(byte[] b,
int off,
boolean bLittleEndian)
public static int toInt(byte[] b)
public static int toInt(byte[] b,
boolean bLittleEndian)
public static int toInt(byte[] b,
int off)
public static int toInt(byte[] b,
int off,
boolean bLittleEndian)
public static long toLong(byte[] b)
public static long toLong(byte[] b,
boolean bLittleEndian)
public static long toLong(byte[] b,
int off)
public static long toLong(byte[] b,
int off,
boolean bLittleEndian)
public static byte[] fromBigInteger(BigInteger bi, int len)
@Deprecated public static byte[] encodeLatin1(String str)
@Deprecated public static String decodeLatin1(byte[] b)
@Deprecated public static String decodeLatin1(byte[] b, int off, int len)
@Deprecated public static byte[] encodeUtf8(String str)
@Deprecated public static String decodeUtf8(byte[] b)
@Deprecated public static String decodeUtf8(byte[] b, int off, int len)
public static byte[] add(byte[] b1,
int off1,
int len1,
byte[] b2,
int off2,
int len2)
public static byte[] add(byte[]... b)
public static byte[] clone(byte[] b)
public static byte[] left(byte[] b,
int len)
public static byte[] right(byte[] b,
int len)
public static byte[] sub(byte[] b,
int off)
public static byte[] sub(byte[] b,
int off,
int len)
public static boolean equals(byte[] b1,
int off1,
byte[] b2,
int off2,
int len)
public static boolean equals(byte[] b1,
byte[] b2)
public static byte[] random(int len)
public static byte[] secureRandom(int len)
public static void dump(PrintStream out, byte[] b, int off, int len)
public static void dump(PrintStream out, byte[] b)
public static void dump(PrintWriter out, byte[] b, int off, int len)
public static void dump(PrintWriter out, byte[] b)
public static void xor(byte[] src,
int srcPos,
byte[] dest,
int destPos,
int length)
public static void xor(byte[] src1,
int src1Pos,
byte[] src2,
int src2Pos,
byte[] dest,
int destPos,
int length)
Copyright © 2016. All rights reserved.