public static byte[][] toArray(final List<byte[]> array) {
    // List#toArray doesn't work on lists of byte [].
    byte[][] results = new byte[array.size()][];
    for (int i = 0; i < array.size(); i++) {
      results[i] = array.get(i);
    }
    return results;
  }
Convert a list of byte arrays into an array of byte arrays
@param array List of byte [].
@return Array of byte [].
hbase-common/src/main/java/org/apache/hadoop/hbase/io/ImmutableBytesWritable.java