@param a array @param length amount of bytes to snarf @return Last length bytes from a
(final byte[] a, final int length)
| 1146 | * @return Last <code>length</code> bytes from <code>a</code> |
| 1147 | */ |
| 1148 | public static byte[] tail(final byte[] a, final int length) { |
| 1149 | if (a.length < length) { |
| 1150 | return null; |
| 1151 | } |
| 1152 | byte[] result = new byte[length]; |
| 1153 | System.arraycopy(a, a.length - length, result, 0, length); |
| 1154 | return result; |
| 1155 | } |
| 1156 | |
| 1157 | /** |
| 1158 | * @param a |