Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 3973 public static byte[] copyOfRange(byte[] original, int start, int end) {
- 3974 if (start <= end) {
- 3975 if (original.length >= start && 0 <= start) {
- 3976 int length = end - start;
- 3977 int copyLength = Math.min(length, original.length - start);
- 3978 byte[] copy = new byte[length];
- 3979 System.arraycopy(original, start, copy, 0, copyLength);
- 3980 return copy;
- 3981 }
- 3982 throw new ArrayIndexOutOfBoundsException();
- 3983 }
- 3984 throw new IllegalArgumentException();
- 3985 }
- 3986
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement