Marks the following bytes in the stream as active. @param len The number of bytes in the active region. @throws IllegalArgumentException The number of bytes in the active region is longer than the remainder of the input.
(int len)
| 69 | * is longer than the remainder of the input. |
| 70 | */ |
| 71 | public void |
| 72 | setActive(int len) { |
| 73 | if (len > byteBuffer.capacity() - byteBuffer.position()) { |
| 74 | throw new IllegalArgumentException("cannot set active " + |
| 75 | "region past end of input"); |
| 76 | } |
| 77 | byteBuffer.limit(byteBuffer.position() + len); |
| 78 | } |
| 79 | |
| 80 | /** |
| 81 | * Clears the active region of the string. Further operations are not |