Created
May 1, 2013 12:21
-
-
Save openrijal/5495005 to your computer and use it in GitHub Desktop.
Implementation of Arrays.copyOfRange() in terms of System.arraycopy() for compatibility in older Android versions.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public byte[] copyOfRange(byte[] from, int start, int end){ | |
int length = end - start; | |
byte[] result = new byte[length]; | |
System.arraycopy(from, start, result, 0, length); | |
return result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment