public long skip(long skip) throws IOException { return reader.skip(skip); }
public long skip(long pChars) throws IOException { synchronized (finalLock) { long skipped = current.skip(pChars); if (skipped == 0 && currentSting < strings.length) { nextReader(); return skip(pChars); } next += skipped; return skipped; } }
public void reset() throws IOException { synchronized (finalLock) { ensureOpen(); if (currentSting != markedString) { currentSting = markedString - 1; nextReader(); current.skip(mark); } else { current.reset(); } next = mark; } }
@Override public long skip(long n) throws IOException { long bytesSkipped = super.skip(n); consumed += bytesSkipped; counter += bytesSkipped; return bytesSkipped; }
/** * Skips over and discards <code>n</code> chars of data from this input stream. The skip method * may, for a variety of reasons, end up skipping over some smaller number of chars, possibly 0. * This may result from any of a number of conditions; reaching end of file before * <code>n</code> chars have been skipped is only one possibility. The actual number of chars * skipped is returned. If <code>n</code> is negative, no chars are skipped. * * @param n The number of chars to be skipped. * @return The actual number of chars skipped. **/ public long skip(long n) throws IOException { return in.skip(n * 2); }
public long skip(long skip) throws IOException { return reader.skip(skip); }
public long skip(long ns) throws IOException { return freemarkerProcessedReader.skip(ns); }
public long skip(long skip) throws IOException { return reader.skip(skip); }
System.out.println(new StringReader("stackoverflow").skip(Long.MAX_VALUE));
@SuppressFBWarnings("SR_NOT_CHECKED") @Override public JsonValue parseValue(JsonReducedValueParser parser, int offset) throws IOException { StringReader reader = new StringReader(source); if (reader.skip(initialOffset + offset) != initialOffset + offset) { throw new IOException("There are not enough characters in this string"); } return parser.parse(reader); }
public Reader openReader(long pos) throws FetchException { StringReader r = new StringReader(mStr); try { r.skip(pos); } catch (IOException e) { throw new FetchException(e); } return r; }
public Reader openReader(long pos) throws FetchException { StringReader r = new StringReader(mStr); try { r.skip(pos); } catch (IOException e) { throw new FetchException(e); } return r; }
static SkipResult skipConstant(StringReader input, String constant) throws IOException { int len = constant.length(); int c = skipLws(input, false); for (int i = 0; i < len; i++) { if (i == 0 && c == -1) { return SkipResult.EOF; } if (c != constant.charAt(i)) { input.skip(-(i + 1)); return SkipResult.NOT_FOUND; } if (i != (len - 1)) { c = input.read(); } } return SkipResult.FOUND; }
private static SkipConstantResult skipConstant(StringReader input, String constant) throws IOException { int len = constant.length(); int c = skipLws(input, false); for (int i = 0; i < len; i++) { if (i == 0 && c == -1) { return SkipConstantResult.EOF; } if (c != constant.charAt(i)) { input.skip(-(i + 1)); return SkipConstantResult.NOT_FOUND; } if (i != (len - 1)) { c = input.read(); } } return SkipConstantResult.FOUND; }
public long skip(long pChars) throws IOException { synchronized (mLock) { long skipped = mCurrent.skip(pChars); if (skipped == 0 && mCurrentSting < mStrings.length) { nextReader(); return skip(pChars); } mNext += skipped; return skipped; } }
public long skip(long pChars) throws IOException { synchronized (finalLock) { long skipped = current.skip(pChars); if (skipped == 0 && currentSting < strings.length) { nextReader(); return skip(pChars); } next += skipped; return skipped; } }
private static SkipConstantResult skipConstant(StringReader input, String constant) throws IOException { int len = constant.length(); int c = skipLws(input, false); for (int i = 0; i < len; i++) { if (i == 0 && c == -1) { return SkipConstantResult.EOF; } if (c != constant.charAt(i)) { input.skip(-(i + 1)); return SkipConstantResult.NOT_FOUND; } if (i != (len - 1)) { c = input.read(); } } return SkipConstantResult.FOUND; }
/** * @return the token if one was found, the empty string if no data was * available to read or <code>null</code> if data other than a * token was found */ private static String readToken(StringReader input) throws IOException { StringBuilder result = new StringBuilder(); int c = skipLws(input, false); while (c != -1 && isToken(c)) { result.append((char) c); c = input.read(); } // Skip back so non-token character is available for next read input.skip(-1); if (c != -1 && result.length() == 0) { return null; } else { return result.toString(); } }
public void reset() throws IOException { synchronized (finalLock) { ensureOpen(); if (currentSting != markedString) { currentSting = markedString - 1; nextReader(); current.skip(mark); } else { current.reset(); } next = mark; } }
public void reset() throws IOException { synchronized (mLock) { ensureOpen(); if (mCurrentSting != mMarkedString) { mCurrentSting = mMarkedString - 1; nextReader(); mCurrent.skip(mMark); } else { mCurrent.reset(); } mNext = mMark; } }