Returns an array with all elements and resets the array size. @return array
()
| 95 | * @return array |
| 96 | */ |
| 97 | public byte[] next() { |
| 98 | final int s = size; |
| 99 | if(s == 0) return EMPTY; |
| 100 | size = 0; |
| 101 | return Arrays.copyOf(list, s); |
| 102 | } |
| 103 | |
| 104 | /** |
| 105 | * Returns an array with all elements and invalidates the internal array. |