Creates a new {@link Guid} which is a unique, replicable representation of the pair (this, byteArrays).
@param byteArrays an array of byte arrays.
@return a new {@link Guid}.
@throws IOException
188010
public Guid append(byte[]... byteArrays) throws IOException {
    if (byteArrays == null || byteArrays.length == 0) {
      return this;
    }
    return fromByteArrays(ArrayUtils.add(byteArrays, this.sha));
  }
678734
public static byte[] copy(byte[] array) {
		byte[] newArray = new byte[array.length];
		System.arraycopy(array, 0, newArray, 0, array.length);
		return newArray;
	}
37619
public NDArray<T> cloneArray() {
        NDArray<T> copy = new NDArray<>(dimensions.clone());
        copy.values = values.clone();
        return copy;
    }
598826
public static JsonbSerializer<?>[] joinJsonbSerializerArrays(final JsonbSerializer<?>[]... serializerArrays) {
        final List<JsonbSerializer<?>> all = joinArrays(serializerArrays);
        return all.toArray(new JsonbSerializer<?>[all.size()]);
    }
1038740
public static byte searchMax(byte[] byteArray) {
        if(byteArray.length == 0) {
            throw new IllegalArgumentException("The array you provided does not have any elements");
        }

        byte max = byteArray[0];

        for(int i = 1; i < byteArray.length; i++) {
            if(byteArray[i] > max) {
                max = byteArray[i];
            }
        }

        return max;
    }
737238
function cloneTypedArray(typedArray, isDeep) {
  var buffer = isDeep ? _cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
  return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
}
928972
public static byte[] add(byte[] array, byte[] array2) {
		byte[] newArray = new byte[array.length + array2.length];
		System.arraycopy(array, 0, newArray, 0, array.length);
		System.arraycopy(array2, 0, newArray, array.length, array2.length);
		return newArray;
	}
342998
public static byte[] getRowKey(final BeanId id, final UniqueIds uids) {
        final byte[] iid = uids.getUiid().getId(id.getInstanceId());
        final byte[] sid = uids.getUsid().getId(id.getSchemaName());
        final byte[] rowkey = new byte[sid.length + iid.length];
        System.arraycopy(sid, 0, rowkey, 0, sid.length);
        System.arraycopy(iid, 0, rowkey, sid.length, iid.length);
        return rowkey;
    }
937766
public static byte[] journalIdStringToBytes(String jid) {
    byte[] byteArray = new byte[jid.length()];
    for (int i = 0; i < jid.length(); i++) {
      byteArray[i] = (byte) jid.charAt(i);
    }
    return byteArray;
  }
661287
public static String toHex(byte[] byteArray) {

        String result = null;
        if (byteArray != null) {
            result = Hex.encodeHexString(byteArray);
        }
        return result;
    }
1336576
public static JsonbDeserializer<?>[] joinJsonbDeserializerArrays(final JsonbDeserializer<?>[]... deserializerArrays) {
        final List<JsonbDeserializer<?>> all = joinArrays(deserializerArrays);
        return all.toArray(new JsonbDeserializer<?>[all.size()]);
    }
252590
public static JavaRDD<LabeledPoint> fromBinary(JavaPairRDD<String, PortableDataStream> binaryFiles,
                    final RecordReader reader) {
        JavaRDD<Collection<Writable>> records =
                        binaryFiles.map(new Function<Tuple2<String, PortableDataStream>, Collection<Writable>>() {
                            @Override
                            public Collection<Writable> call(
                                            Tuple2<String, PortableDataStream> stringPortableDataStreamTuple2)
                                            throws Exception {
                                reader.initialize(new InputStreamInputSplit(stringPortableDataStreamTuple2._2().open(),
                                                stringPortableDataStreamTuple2._1()));
                                return reader.next();
                            }
                        });

        JavaRDD<LabeledPoint> ret = records.map(new Function<Collection<Writable>, LabeledPoint>() {
            @Override
            public LabeledPoint call(Collection<Writable> writables) throws Exception {
                return pointOf(writables);
            }
        });
        return ret;
    }
15192
InputSource createInputSource(byte[] data, String systemId) {

        InputSource result = new InputSource(new ByteArrayInputStream(data));
        result.setSystemId(systemId);
        return result;
    }
734016
public static byte[] copyToByteArray(InputStream in) throws IOException {
        ByteArrayOutputStream out = new ByteArrayOutputStream(BUFFER_SIZE);
        copy(in, out);
        return out.toByteArray();
    }
108820
@Override
  public Guid guid() throws IOException {
    StringBuilder uniqueString = new StringBuilder();
    uniqueString.append(getFileStatus().getModificationTime());
    uniqueString.append(getFileStatus().getLen());
    uniqueString.append(getFileStatus().getPath());
    return Guid.fromStrings(uniqueString.toString());
  }
557535
public static byte[] concat(byte[]... arrays) {
		int size = 0;
		for (byte[] a: arrays) {
			size += a.length;
		}
		byte[] result = new byte[size];
		int index = 0;
		for (byte[] a: arrays) {
			System.arraycopy(a, 0, result, index, a.length);
			index += a.length;
		}
		return result;
	}
361858
public static Iterable<String> toHexStrings(Iterable<ByteArray> arrays) {
        ArrayList<String> ret = new ArrayList<String>();
        for(ByteArray array: arrays)
            ret.add(ByteUtils.toHexString(array.get()));
        return ret;
    }