(long n)
| 108 | } |
| 109 | |
| 110 | @Override |
| 111 | public long skip(long n) throws IOException { |
| 112 | if (in == null || n <= 0) { |
| 113 | return 0; |
| 114 | } |
| 115 | long result = in.skip(n); |
| 116 | if (result != 0) { |
| 117 | return result; |
| 118 | } |
| 119 | if (read() == -1) { |
| 120 | return 0; |
| 121 | } |
| 122 | return 1 + in.skip(n - 1); |
| 123 | } |
| 124 | } |