public class ByteArrayUtil
extends java.lang.Object
| Constructor and Description |
|---|
ByteArrayUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
byteArrayToCharArray(byte[] in,
int inoff,
char[] out,
int outoff,
int len)
Copies len bytes starting from offin to out starting at outoff.
|
static void |
bzero(byte[] ar,
int off,
int len)
Set len bytes starting form off to zero
|
static void |
bzero(char[] ar,
int off,
int len)
Set len bytes starting form off to zero
|
static void |
charArrayToByteArray(char[] in,
int inoff,
byte[] out,
int outoff,
int len)
Copies len bytes starting from offin to out starting at outoff.
|
static byte[] |
conc(byte[] b1,
byte[] b2)
Concatenates bytearrays
|
static byte[] |
conc(byte[] b1,
byte[] b2,
byte[] b3)
Concatenates bytearrays
|
static byte[] |
conc(byte[] b1,
byte[] b2,
byte[] b3,
byte[] b4)
Concatenates bytearrays
|
static byte[] |
conc(byte[] b1,
byte[] b2,
byte[] b3,
byte[] b4,
byte[] b5)
Concatenates bytearrays
|
static byte[] |
conc(byte[] b1,
byte[] b2,
byte[] b3,
byte[] b4,
byte[] b5,
byte[] b6)
Concatenates bytearrays
|
static byte[] |
conc(byte[] b1,
byte[] b2,
int b2_len)
Concatenates two byte arrays
|
static byte[] |
copy(byte[] bytes,
int index,
int length)
copy some bytes from an array of bytes
|
static boolean |
equal(byte[] arrayOne,
byte[] arrayTwo)
Tests if two byte arrays are equal.
|
static boolean |
equal(byte[] a_arrayA,
int a_Aoff,
byte[] a_arrayB,
int a_Boff,
int a_length)
Tests if a_length positions of two arrays are equal.
|
static boolean |
equal(char[] a_arrayA,
int a_Aoff,
char[] a_arrayB,
int a_Boff,
int a_length)
Tests if a_length positions of two arrays are equal.
|
static byte[] |
inttobyte(long l,
int length)
Converts a long to a array of bytes
|
public static byte[] conc(byte[] b1,
byte[] b2)
public static byte[] conc(byte[] b1,
byte[] b2,
byte[] b3)
public static byte[] conc(byte[] b1,
byte[] b2,
byte[] b3,
byte[] b4)
public static byte[] conc(byte[] b1,
byte[] b2,
byte[] b3,
byte[] b4,
byte[] b5)
public static byte[] conc(byte[] b1,
byte[] b2,
byte[] b3,
byte[] b4,
byte[] b5,
byte[] b6)
public static byte[] conc(byte[] b1,
byte[] b2,
int b2_len)
b1 - b2 - public static byte[] inttobyte(long l,
int length)
l - length - public static byte[] copy(byte[] bytes,
int index,
int length)
bytes - array of bytesindex - startpositionlength - lengthpublic static boolean equal(byte[] arrayOne,
byte[] arrayTwo)
arrayOne - a byte arrayarrayTwo - another byte arraypublic static final boolean equal(byte[] a_arrayA,
int a_Aoff,
byte[] a_arrayB,
int a_Boff,
int a_length)
a_arrayA - byte[]a_APos - inta_arrayB - byte[]a_BPos - inta_length - intpublic static final boolean equal(char[] a_arrayA,
int a_Aoff,
char[] a_arrayB,
int a_Boff,
int a_length)
a_arrayA - char[]a_APos - inta_arrayB - char[]a_BPos - inta_length - intpublic static void bzero(byte[] ar,
int off,
int len)
public static void bzero(char[] ar,
int off,
int len)
public static void byteArrayToCharArray(byte[] in,
int inoff,
char[] out,
int outoff,
int len)
public static void charArrayToByteArray(char[] in,
int inoff,
byte[] out,
int outoff,
int len)
Copyright © 2023. All rights reserved.