Java Utililty Methods Byte Array Copy

List of utility methods to do Byte Array Copy

Description

The list of methods to do Byte Array Copy are organized into topic(s).

Method

voidcopyBytesWithin(byte[] bytes, int target, int start, int end)
copy Bytes Within
System.arraycopy(bytes, start, bytes, target, end - start);
voidmemcpy(byte[] dest, int doff, byte[] src, int soff, int len)
memcpy
for (int i = 0; i < len; i++) {
    dest[doff + i] = src[soff + i];
voidmemcpy(byte[] destBytes, byte[] srcBytes, int numBytes)
memcpy
for (int i = 0; i < numBytes; i++) {
    destBytes[i] = srcBytes[i];
intmemcpy(byte[] dst, int dst_offset, byte[] src, int src_offset, int length)
Copy contents of one array of bytes into another.
if ((dst != null) && (src != null)) {
    if (dst.length < (dst_offset + length)) {
        croak("dst.length = " + dst.length + ", but " + "dst_offset = " + dst_offset + " and length = "
                + length + ".");
    if (src.length < (src_offset + length)) {
        croak("src.length = " + src.length + ", but " + "src_offset = " + src_offset + " and length = "
                + length + ".");
...
voidmemcpy(Object to, Object from, int size)
MEMORY
System.arraycopy(from, 0, to, 0, size);