public static byte[] toArray(final List<Byte> list) {
    final byte[] output = new byte[list.size()];

    for (int i = 0; i < output.length; i++) {
      output[i] = list.get(i);
    }

    return output;
  }
Converts a list of bytes into a byte array.

@param list The list to convert.
@return The created byte array.
java/zylib/src/main/java/com/google/security/zynamics/zylib/general/ByteHelpers.java