(int length)
| 40 | } |
| 41 | |
| 42 | byte[] next(int length) { |
| 43 | if (size - position < length) { |
| 44 | return null; |
| 45 | } |
| 46 | byte[] result = Arrays.copyOfRange(array, position, position + length); |
| 47 | position += length; |
| 48 | return result; |
| 49 | } |
| 50 | |
| 51 | byte[] next(byte[] delimiter) { |
| 52 | int index = indexOf(delimiter); |