Here you can find the source of arraycopy(long src[], int srcOffset, long dest[], int destOffset, int limit)
public static final void arraycopy(long src[], int srcOffset, long dest[], int destOffset, int limit)
//package com.java2s; //License from project: Open Source License public class Main { public static final void arraycopy(long src[], int srcOffset, long dest[], int destOffset, int limit) { if (src == dest) { if (srcOffset == destOffset) { return; }//w w w.j av a2s . c om if (destOffset > srcOffset && destOffset < srcOffset + limit) { limit--; srcOffset += limit; destOffset += limit; limit = srcOffset - limit; for (limit += 3; srcOffset >= limit;) { dest[destOffset--] = src[srcOffset--]; dest[destOffset--] = src[srcOffset--]; dest[destOffset--] = src[srcOffset--]; dest[destOffset--] = src[srcOffset--]; } for (limit -= 3; srcOffset >= limit;) { dest[destOffset--] = src[srcOffset--]; } return; } } limit += srcOffset; for (limit -= 3; srcOffset < limit;) { dest[destOffset++] = src[srcOffset++]; dest[destOffset++] = src[srcOffset++]; dest[destOffset++] = src[srcOffset++]; dest[destOffset++] = src[srcOffset++]; } for (limit += 3; srcOffset < limit;) { dest[destOffset++] = src[srcOffset++]; } } public static final void arraycopy(short src[], int srcOffset, short dest[], int destOffset, int k) { if (src == dest) { if (srcOffset == destOffset) { return; } if (destOffset > srcOffset && destOffset < srcOffset + k) { k--; srcOffset += k; destOffset += k; k = srcOffset - k; for (k += 7; srcOffset >= k;) { dest[destOffset--] = src[srcOffset--]; dest[destOffset--] = src[srcOffset--]; dest[destOffset--] = src[srcOffset--]; dest[destOffset--] = src[srcOffset--]; dest[destOffset--] = src[srcOffset--]; dest[destOffset--] = src[srcOffset--]; dest[destOffset--] = src[srcOffset--]; dest[destOffset--] = src[srcOffset--]; } for (k -= 7; srcOffset >= k;) { dest[destOffset--] = src[srcOffset--]; } return; } } k += srcOffset; for (k -= 7; srcOffset < k;) { dest[destOffset++] = src[srcOffset++]; dest[destOffset++] = src[srcOffset++]; dest[destOffset++] = src[srcOffset++]; dest[destOffset++] = src[srcOffset++]; dest[destOffset++] = src[srcOffset++]; dest[destOffset++] = src[srcOffset++]; dest[destOffset++] = src[srcOffset++]; dest[destOffset++] = src[srcOffset++]; } for (k += 7; srcOffset < k;) { dest[destOffset++] = src[srcOffset++]; } } public static final void arraycopy(int src[], int srcOffset, int dest[], int destOffset, int k) { if (src == dest) { if (srcOffset == destOffset) { return; } if (destOffset > srcOffset && destOffset < srcOffset + k) { k--; srcOffset += k; destOffset += k; k = srcOffset - k; for (k += 7; srcOffset >= k;) { dest[destOffset--] = src[srcOffset--]; dest[destOffset--] = src[srcOffset--]; dest[destOffset--] = src[srcOffset--]; dest[destOffset--] = src[srcOffset--]; dest[destOffset--] = src[srcOffset--]; dest[destOffset--] = src[srcOffset--]; dest[destOffset--] = src[srcOffset--]; dest[destOffset--] = src[srcOffset--]; } for (k -= 7; srcOffset >= k;) { dest[destOffset--] = src[srcOffset--]; } return; } } k += srcOffset; for (k -= 7; srcOffset < k;) { dest[destOffset++] = src[srcOffset++]; dest[destOffset++] = src[srcOffset++]; dest[destOffset++] = src[srcOffset++]; dest[destOffset++] = src[srcOffset++]; dest[destOffset++] = src[srcOffset++]; dest[destOffset++] = src[srcOffset++]; dest[destOffset++] = src[srcOffset++]; dest[destOffset++] = src[srcOffset++]; } for (k += 7; srcOffset < k;) { dest[destOffset++] = src[srcOffset++]; } } public static final void arraycopy(Object src[], int srcOffset, Object dest[], int destOffset, int limit) { if (src == dest) { if (srcOffset == destOffset) { return; } if (destOffset > srcOffset && destOffset < srcOffset + limit) { limit--; srcOffset += limit; destOffset += limit; limit = srcOffset - limit; for (limit += 7; srcOffset >= limit;) { dest[destOffset--] = src[srcOffset--]; dest[destOffset--] = src[srcOffset--]; dest[destOffset--] = src[srcOffset--]; dest[destOffset--] = src[srcOffset--]; dest[destOffset--] = src[srcOffset--]; dest[destOffset--] = src[srcOffset--]; dest[destOffset--] = src[srcOffset--]; dest[destOffset--] = src[srcOffset--]; } for (limit -= 7; srcOffset >= limit;) { dest[destOffset--] = src[srcOffset--]; } return; } } limit += srcOffset; for (limit -= 7; srcOffset < limit;) { dest[destOffset++] = src[srcOffset++]; dest[destOffset++] = src[srcOffset++]; dest[destOffset++] = src[srcOffset++]; dest[destOffset++] = src[srcOffset++]; dest[destOffset++] = src[srcOffset++]; dest[destOffset++] = src[srcOffset++]; dest[destOffset++] = src[srcOffset++]; dest[destOffset++] = src[srcOffset++]; } for (limit += 7; srcOffset < limit;) { dest[destOffset++] = src[srcOffset++]; } } public static final void arraycopy(byte src[], int srcOffset, byte dest[], int destOffset, int limit) { if (src == dest) { if (srcOffset == destOffset) { return; } if (destOffset > srcOffset && destOffset < srcOffset + limit) { limit--; srcOffset += limit; destOffset += limit; limit = srcOffset - limit; for (limit += 7; srcOffset >= limit;) { dest[destOffset--] = src[srcOffset--]; dest[destOffset--] = src[srcOffset--]; dest[destOffset--] = src[srcOffset--]; dest[destOffset--] = src[srcOffset--]; dest[destOffset--] = src[srcOffset--]; dest[destOffset--] = src[srcOffset--]; dest[destOffset--] = src[srcOffset--]; dest[destOffset--] = src[srcOffset--]; } for (limit -= 7; srcOffset >= limit;) { dest[destOffset--] = src[srcOffset--]; } return; } } limit += srcOffset; for (limit -= 7; srcOffset < limit;) { dest[destOffset++] = src[srcOffset++]; dest[destOffset++] = src[srcOffset++]; dest[destOffset++] = src[srcOffset++]; dest[destOffset++] = src[srcOffset++]; dest[destOffset++] = src[srcOffset++]; dest[destOffset++] = src[srcOffset++]; dest[destOffset++] = src[srcOffset++]; dest[destOffset++] = src[srcOffset++]; } for (limit += 7; srcOffset < limit;) { dest[destOffset++] = src[srcOffset++]; } } }