Resets the current position of the output stream to the specified index. @param index The new current position. @throws IllegalArgumentException The index is not within the output.
(int index)
| 72 | * @throws IllegalArgumentException The index is not within the output. |
| 73 | */ |
| 74 | public void |
| 75 | jump(int index) { |
| 76 | if (index > pos) { |
| 77 | throw new IllegalArgumentException("cannot jump past " + |
| 78 | "end of data"); |
| 79 | } |
| 80 | pos = index; |
| 81 | } |
| 82 | |
| 83 | /** |
| 84 | * Saves the current state of the output stream. |