public class DataConverter
extends java.lang.Object
Constructor and Description |
---|
DataConverter() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
byteArrayToByteArray(byte[] srcByte)
Deprecated.
This method is no longer acceptable.
Use |
static java.lang.String |
byteArrayToString(byte[] array)
Converts a null-terminated byte array to java string.
|
static byte[] |
getArrayWithoutNulls(byte[] data,
int offset)
Вернуть массив без NULL-данных
|
static byte[] |
getNullTerminatedArray(byte[] srcByte)
Returns this java byte array as a null-terminated byte array.
|
static int |
getSizeWithoutNulls(byte[] data,
int offset)
Вернуть размер массива без NULL-данных
|
static byte[] |
stringToByteArray(java.lang.String str)
Returns this java string as a null-terminated byte array.
|
public static byte[] stringToByteArray(java.lang.String str)
str
- The given string to be converted.public static byte[] byteArrayToByteArray(byte[] srcByte)
Use getNullTerminatedArray(byte[])
instead.
srcByte
- public static byte[] getNullTerminatedArray(byte[] srcByte)
srcByte
- The given byte array to be converted.public static java.lang.String byteArrayToString(byte[] array)
array
- The given array to be converted.public static int getSizeWithoutNulls(byte[] data, int offset)
data
- Массивoffset
- Смещениеpublic static byte[] getArrayWithoutNulls(byte[] data, int offset)
data
- Массивoffset
- СмещениеCopyright © 1998-2014 Gamma Technologies. All Rights Reserved.