Sets a mark position in this reader. The parameter readLimit is ignored for this class. Calling reset() will reposition the reader back to the marked position. @param readLimit ignored for StringReader instances. @throws IllegalArgumentException if {@c
(int readLimit)
| 80 | * @see #reset() |
| 81 | */ |
| 82 | @Override |
| 83 | public void mark(int readLimit) throws IOException { |
| 84 | if (readLimit < 0) { |
| 85 | throw new IllegalArgumentException(); |
| 86 | } |
| 87 | |
| 88 | synchronized (lock) { |
| 89 | if (isClosed()) { |
| 90 | throw new IOException("String reader already closed"); //$NON-NLS-1$ |
| 91 | } |
| 92 | markpos = pos; |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | /** |
| 97 | * Indicates whether this reader supports the {@code mark()} and {@code |