Class ByteUtils

java.lang.Object
com.renomad.minum.utils.ByteUtils

public final class ByteUtils extends Object
Handy helpers when working with bytes
  • Method Details

    • byteListToArray

      public static byte[] byteListToArray(List<Byte> result)
      A helper method to reduce some of the boilerplate code when converting a list of bytes to an array.

      Often, we are gradually building up a list - the list takes care of accommodating more elements as necessary. An array, in contrast, is just a single size and doesn't resize itself. It's much less convenient to use, so we more often use lists.