Class ArrayUtils

java.lang.Object
com.yahoo.security.ArrayUtils

public class ArrayUtils extends Object
A small collection of utils for working on arrays of bytes.
Author:
vekterli
  • Constructor Details

    • ArrayUtils

      public ArrayUtils()
  • Method Details

    • concat

      public static byte[] concat(byte[]... bufs)
      Returns a new byte array that is the concatenation of all input byte arrays in input order. E.g. concat("A", "BC", "DE", "F") => "ABCDEF"
    • unhex

      public static byte[] unhex(String hexStr)
    • hex

      public static String hex(byte[] bytes)
    • toUtf8Bytes

      public static byte[] toUtf8Bytes(String str)
    • fromUtf8Bytes

      public static String fromUtf8Bytes(byte[] bytes)