Package | Description |
---|---|
bt.data | |
bt.protocol |
Modifier and Type | Method and Description |
---|---|
byte[] |
Bitfield.toByteArray(BitOrder bitOrder) |
Constructor and Description |
---|
PeerBitfield(byte[] value,
BitOrder bitOrder,
int piecesTotal)
Creates bitfield based on a bitmask.
|
Modifier and Type | Method and Description |
---|---|
static BitOrder |
BitOrder.valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static BitOrder[] |
BitOrder.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
Modifier and Type | Method and Description |
---|---|
static int |
Protocols.getBit(byte[] bytes,
BitOrder bitOrder,
int i)
Gets i-th bit in a bitmask.
|
static boolean |
Protocols.isSet(byte[] bytes,
BitOrder bitOrder,
int i)
Check if i-th bit in the bitmask is set.
|
static void |
Protocols.setBit(byte[] bytes,
BitOrder bitOrder,
int i)
Sets i-th bit in a bitmask.
|
Copyright © 2016–2021. All rights reserved.