public final class Utility extends Object
| Constructor and Description |
|---|
Utility() |
| Modifier and Type | Method and Description |
|---|---|
static int |
bytesToInt(byte[] array,
int offset)
Unmarshal a byte array to an integer.
|
static long |
bytesToLong(byte[] array,
int offset) |
static byte[] |
intToBytes(int value)
Marshal an integer to a byte array.
|
static void |
intToBytes(int value,
byte[] array,
int offset) |
static byte[] |
longToBytes(long value)
Unmarshal a byte array to an long.
|
static void |
longToBytes(long value,
byte[] array,
int offset)
Marshal an long to a byte array.
|
public static final int bytesToInt(byte[] array,
int offset)
array - The array of bytes.offset - The offset from which to start unmarshalling.public static final byte[] intToBytes(int value)
public static final void intToBytes(int value,
byte[] array,
int offset)
public static final byte[] longToBytes(long value)
public static final long bytesToLong(byte[] array,
int offset)
public static final void longToBytes(long value,
byte[] array,
int offset)
array - The array of bytes.offset - The offset from which to start marshalling.Copyright © 2017–2019 Eclipse Foundation. All rights reserved.