Class ByteUtilities
java.lang.Object
com.jelurida.ardor.integration.wallet.ledger.ByteUtilities
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringbytesToHex(byte[] bytes) static byte[]hexToBytes(String hex) static byte[]merge(byte[] in1, byte[] in2) static StringshortToHex(short amount) static byte[]toByteArray(int i) Returns a byte array given an int, function is guaranteed to return a non-null value that is of length 4static byte[]toHardenedOffset(int i) static byte[]trimHead(byte[] in, int amount) static byte[]trimTail(byte[] in, int amount)
-
Constructor Details
-
ByteUtilities
public ByteUtilities()
-
-
Method Details
-
merge
public static byte[] merge(byte[] in1, byte[] in2) -
trimHead
public static byte[] trimHead(byte[] in, int amount) -
trimTail
public static byte[] trimTail(byte[] in, int amount) -
shortToHex
-
bytesToHex
-
hexToBytes
-
toByteArray
public static byte[] toByteArray(int i) Returns a byte array given an int, function is guaranteed to return a non-null value that is of length 4- Parameters:
i- input integer- Returns:
- big-endian encoded byte array of length 4
-
toHardenedOffset
public static byte[] toHardenedOffset(int i)
-