Skips characters. @param toSkip the number of characters to skip @return The number of characters actually skipped
(long toSkip)
| 174 | * @return The number of characters actually skipped |
| 175 | */ |
| 176 | @Override |
| 177 | public long skip(long toSkip) throws IOException { |
| 178 | for (long i = 0; i < toSkip; i++) { |
| 179 | int intRead = read(); |
| 180 | if (intRead == -1) return i; |
| 181 | } |
| 182 | return toSkip; |
| 183 | } |
| 184 | |
| 185 | /** |
| 186 | * Reads characters into an array. |