public class Bits extends Object implements Comparable<Bits>
| Modifier and Type | Field and Description |
|---|---|
int |
bitLength |
static Bits |
NULL |
static Bits |
ONE |
static Bits |
ZERO |
| Constructor and Description |
|---|
Bits(byte... data) |
Bits(byte[] data,
int length) |
Bits(long data) |
Bits(long value,
int length) |
Bits(Random random,
int length) |
| Modifier and Type | Method and Description |
|---|---|
Bits |
bitwiseAnd(Bits right) |
Bits |
bitwiseOr(Bits right) |
Bits |
bitwiseXor(Bits right) |
int |
compareTo(Bits arg0) |
Bits |
concatenate(Bits right) |
static int |
dataCompare(Bits left,
Bits right) |
static Bits |
divide(long numerator,
long denominator,
long maxBits) |
boolean |
equals(Object obj) |
byte[] |
getBytes() |
int |
hashCode() |
static byte |
highestOneBit(long v) |
Bits |
leftShift(int bits) |
Bits |
next() |
Bits |
padLeft(int targetLength) |
static byte[] |
padLeftBytes(byte[] src,
int bytes) |
Bits |
padRight(long targetLength) |
Bits |
range(int start) |
Bits |
range(int start,
int length) |
static byte[] |
shiftLeft(byte[] src,
int bits) |
static void |
shiftLeft(byte[] src,
int bits,
byte[] dst) |
static byte[] |
shiftRight(byte[] src,
int bits) |
boolean |
startsWith(Bits key) |
CharSequence |
toBase64String() |
String |
toBitString() |
static byte[] |
toBytes(long data) |
CharSequence |
toHexString() |
long |
toLong() |
String |
toString() |
static byte[] |
trim(byte[] bytes) |
public static Bits ONE
public static Bits ZERO
public static Bits NULL
public final int bitLength
public Bits(byte... data)
public Bits(byte[] data,
int length)
public Bits(long data)
public Bits(long value,
int length)
public Bits(Random random, int length)
public static Bits divide(long numerator, long denominator, long maxBits)
public static byte highestOneBit(long v)
public static byte[] padLeftBytes(byte[] src,
int bytes)
public static byte[] shiftLeft(byte[] src,
int bits)
public static void shiftLeft(byte[] src,
int bits,
byte[] dst)
public static byte[] shiftRight(byte[] src,
int bits)
public static byte[] toBytes(long data)
public static byte[] trim(byte[] bytes)
public int compareTo(Bits arg0)
compareTo in interface Comparable<Bits>public byte[] getBytes()
public Bits leftShift(int bits)
public Bits next()
public Bits range(int start)
public Bits range(int start, int length)
public boolean startsWith(Bits key)
public String toBitString()
public CharSequence toHexString()
public CharSequence toBase64String()
public long toLong()
public Bits padRight(long targetLength)
public Bits padLeft(int targetLength)
Copyright © 2019 SimiaCryptus Software. All rights reserved.