Class ByteUtilities

java.lang.Object
com.jelurida.ardor.integration.wallet.ledger.ByteUtilities

public class ByteUtilities extends Object
  • 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

      public static String shortToHex(short amount)
    • bytesToHex

      public static String bytesToHex(byte[] bytes)
    • hexToBytes

      public static byte[] hexToBytes(String hex)
    • 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)