/** * Appends all of the bytes from another byte array to this vec. * @param values the values to append */ public void append(byte[] values) { append(values, 0, values.length); }
/** * Concatenates another vector onto the end of this one. * @param other the other vector to concatenate onto this one */ public void append(ByteVec other) { append(other.data, 0, other.len); }
/** {@inheritDoc} */ @Override public ByteVec clone() { ByteVec clone = ByteVec.withCapacity(data.length); clone.append(this); return clone; } }
/** * Encodes a hash bucket into the buffer. * @param bucket the bucket * @param buf the buffer */ public static void encodeHashBucket(int bucket, ByteVec buf) { buf.append(Ints.toByteArray(bucket)); }