public class Converter extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
HIGH_INTEGER_BITS |
static long |
HIGH_LONG_BITS |
| Constructor and Description |
|---|
Converter() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
bytes(int[] trits) |
static byte[] |
bytes(int[] trits,
int offset,
int size)
Converts the specified trits array to bytes.
|
static int[] |
convertToIntArray(List<Integer> integers) |
static int[] |
copyTrits(String input,
int[] destination)
Copies the trits from the input string into the destination array
|
static int[] |
fromValue(int value)
Converts the specified integer to its corresponding trits value.
|
static void |
getTrits(byte[] bytes,
int[] trits)
Gets the trits from the specified bytes and stores it into the provided trits array.
|
static void |
increment(int[] trits,
int size)
Increments the specified trits.
|
static long |
longValue(int[] trits)
Converts the specified trits to its corresponding integer value.
|
static int[] |
trits(long trytes)
Converts trytes into trits.
|
static int[] |
trits(long trytes,
int length)
Converts the specified trinary encoded string into a trits array of the specified length.
|
static int[] |
trits(String trytes)
Converts trytes into trits.
|
static int[] |
trits(String trytes,
int length)
Converts the specified trinary encoded string into a trits array of the specified length.
|
static int[] |
tritsString(String trytes)
Deprecated.
|
static String |
trytes(int[] trits) |
static String |
trytes(int[] trits,
int offset,
int size)
Converts trits to trytes.
|
static String |
trytes(List<Integer> trits) |
static String |
trytes(List<Integer> trits,
int offset,
int size)
Converts trits to trytes.
|
static int |
tryteValue(int[] trits,
int offset)
Converts the specified trits array to trytes in integer representation.
|
static int |
value(int[] trits)
Converts the specified trits to its corresponding integer value.
|
public static final int HIGH_INTEGER_BITS
public static final long HIGH_LONG_BITS
public static byte[] bytes(int[] trits,
int offset,
int size)
trits - The trits.offset - The offset to start from.size - The size.public static byte[] bytes(int[] trits)
public static void getTrits(byte[] bytes,
int[] trits)
bytes - The bytes.trits - The trits.public static int[] trits(String trytes, int length)
trytes - The trytes.length - The lengthpublic static int[] trits(long trytes,
int length)
trytes - The trytes.length - The length.@Deprecated public static int[] tritsString(String trytes)
trytes - The trytes.public static int[] trits(long trytes)
trytes - The trytes to be converted.public static int[] trits(String trytes)
trytes - The trytes to be converted.public static int[] copyTrits(String input, int[] destination)
input - The input String.destination - The destination array.public static String trytes(int[] trits, int offset, int size)
trits - The trits to be converted.offset - The offset to start from.size - The size.public static String trytes(List<Integer> trits, int offset, int size)
trits - The trits to be converted.offset - The offset to start from.size - The size.public static String trytes(int[] trits)
public static int tryteValue(int[] trits,
int offset)
trits - The trits.offset - The offset to start from.public static int value(int[] trits)
trits - The trits.public static int[] fromValue(int value)
value - the integer we want to convertpublic static long longValue(int[] trits)
trits - The trits.public static void increment(int[] trits,
int size)
trits - The trits.size - The size.Copyright © 2019. All rights reserved.