public final class ByteUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
concatenate(byte[] a,
byte[] b) |
static boolean[] |
fromByte(byte b) |
static boolean |
isFalse(byte number,
int index)
Checks if the index-th bit of number is NOT set.
|
static boolean |
isTrue(byte number,
int index)
Checks if the index-th bit of number is set.
|
static byte |
setFalse(byte number,
int index)
Clears a bit, by setting it to 0.
|
static byte |
setTrue(byte number,
int index)
Sets a bit to 1.
|
static String |
toBinaryString(byte number) |
static byte |
toByte(boolean... values) |
public static byte setTrue(byte number,
int index)
number - the original byte valueindex - the bit to setpublic static byte setFalse(byte number,
int index)
number - the original byte valueindex - the bit to setpublic static boolean isTrue(byte number,
int index)
number - the byte valueindex - the bit to checkpublic static boolean isFalse(byte number,
int index)
number - the byte valueindex - the bit to checkpublic static byte toByte(boolean... values)
public static boolean[] fromByte(byte b)
public static String toBinaryString(byte number)
public static byte[] concatenate(byte[] a,
byte[] b)
Copyright © 2021 Hazelcast, Inc.. All rights reserved.