java.lang.Object
me.hugmanrique.cartage.util.BufferUtils
Provides memory handling-related utilities.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidcopyByteByByte(byte[] arr, int srcPos, int destPos, int length)Copies the contents from the specified array byte-by-byte, beginning at the specified position, to the specified position of the array.
-
Method Details
-
copyByteByByte
public static void copyByteByByte(byte[] arr, int srcPos, int destPos, int length)Copies the contents from the specified array byte-by-byte, beginning at the specified position, to the specified position of the array. The source and destination areas may overlap: a copy operation observes the results of past copy operations (unlikeSystem.arraycopy(Object, int, Object, int, int)).Fallbacks to
if the source and destination ranges do not overlap.System.arraycopy(Object, int, Object, int, int)- Parameters:
arr- the source and destination arraysrcPos- the starting source position in the arraydestPos- the starting destination position in the arraylength- the number of array elements to copy
-