public class ByteArrayUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
getFixedSizeBytes(int fixedSize,
String value)
|
static void |
writeFixedString(byte[] dest,
String value,
int offset,
int fixedSize)
Creates a fixed size byte array, populates it with contents of a String
and writes this to a destination byte array
|
static void |
writeInteger(byte[] dest,
int value,
int offset)
Write an integer to a byte array
|
static void |
writeShort(byte[] dest,
short value,
int offset)
Write a short to a byte array
|
public static void writeFixedString(byte[] dest,
String value,
int offset,
int fixedSize)
public static void writeShort(byte[] dest,
short value,
int offset)
dest - the destination byte arrayvalue - the short value to be writtenoffset - the offset to write to in the destination arraypublic static void writeInteger(byte[] dest,
int value,
int offset)
dest - the destination byte arrayvalue - the integer value to be writtenoffset - the offset to write to in the destination arraypublic static byte[] getFixedSizeBytes(int fixedSize,
String value)
Copyright © Nov 2008–2021 JSend NSCA. All rights reserved.