Skips over the remainder of the available bytes.
@throws IOException if an I/O error occurs while seeking within the inner
stream
15101
public void moveToEnd() throws IOException {
    int bytes;
    while (remaining > 0) {
      bytes = (int) inner.skip(remaining);
      if (bytes < 0) {
        break;
      }
      remaining -= bytes;
    }
  }
36558
public static void skip(InputStream is) throws IOException {
        while (is.available() > 0) {
            is.skip(Long.MAX_VALUE);
        }
        is.close();
    }
234407
static private long skipForward(InputStream is, long toSkip)
                throws IOException {

        long eachSkip = 0;
        long skipped = 0;

        while (skipped != toSkip) {
            eachSkip = is.skip(toSkip - skipped);

            // check if EOF is reached
            if (eachSkip <= 0) {
                if (is.read() == -1) {
                    return skipped ;
                } else {
                    skipped++;
                }
            }
            skipped += eachSkip;
        }
        return skipped;
    }
1343967
@Override
  public long skip(long ln) throws IOException {
    try {
      return in.skip(ln);
    } catch (IOException e) {
      handleIOException(e);
      return 0;
    }
  }
671432
public static boolean skipUntil(InputStream in, byte separator) throws IOException {
        int r;
        while((r = in.read()) >= 0) {
            if(((byte) r) == separator) { return true; }
        }
        return false;
    }
549437
public boolean skipPreamble()
            throws IOException {
        // First delimiter may be not preceeded with a CRLF.
        System.arraycopy(boundary, 2, boundary, 0, boundary.length - 2);
        boundaryLength = boundary.length - 2;
        try {
            // Discard all data up to the delimiter.
            discardBodyData();

            // Read boundary - if succeded, the stream contains an
            // encapsulation.
            return readBoundary();
        } catch (MalformedStreamException e) {
            return false;
        } finally {
            // Restore delimiter.
            System.arraycopy(boundary, 0, boundary, 2, boundary.length - 2);
            boundaryLength = boundary.length;
            boundary[0] = CR;
            boundary[1] = LF;
        }
    }
645474
public long skip(long n) throws IOException {
	long ret = pos + n;
	if (ret < 0) {
	    ret = 0;
	    pos = 0;
	} else if (ret > blob.size) {
	    ret = blob.size;
	    pos = blob.size;
	} else {
	    pos = (int) ret;
	}
	return ret;
    }
1057577
private void readMore(final int bytesRequired) throws IOException {
        if ((long) used + (long) bytesRequired > FileUtils.MAX_BUFFER_SIZE) {
            // Since buf is an array, we're limited to reading 2GB per file
            throw new IOException("File is larger than 2GB, cannot read it");
        }
        // Read INITIAL_BUFFER_CHUNK_SIZE for first chunk, or SUBSEQUENT_BUFFER_CHUNK_SIZE for subsequent chunks,
        // but don't try to read past 2GB limit
        final int targetReadSize = Math.max(bytesRequired, // 
                used == 0 ? INITIAL_BUFFER_CHUNK_SIZE : SUBSEQUENT_BUFFER_CHUNK_SIZE);
        // Calculate number of bytes to read, based on the target read size, handling integer overflow
        final int maxNewUsed = (int) Math.min((long) used + (long) targetReadSize, FileUtils.MAX_BUFFER_SIZE);
        final int bytesToRead = maxNewUsed - used;
        if (maxNewUsed > buf.length) {
            // Ran out of space, need to increase the size of the buffer
            long newBufLen = buf.length;
            while (newBufLen < maxNewUsed) {
                newBufLen <<= 1;
            }
            buf = Arrays.copyOf(buf, (int) Math.min(newBufLen, FileUtils.MAX_BUFFER_SIZE));
        }
        int extraBytesStillNotRead = bytesToRead;
        int totBytesRead = 0;
        while (extraBytesStillNotRead > 0) {
            final int bytesRead = read(used, extraBytesStillNotRead);
            if (bytesRead > 0) {
                used += bytesRead;
                totBytesRead += bytesRead;
                extraBytesStillNotRead -= bytesRead;
            } else {
                // EOF
                break;
            }
        }
        if (totBytesRead < bytesRequired) {
            throw new IOException("Premature EOF while reading classfile");
        }
    }
1174837
public long skip(long n) throws IOException {
        long s = super.skip(n);
        if( s<n && filenames.hasNext() ) {
            cueStream();
            return s + skip(n-s);
        }
        return s;
    }
869572
private int skipBytes(ByteBuf in, int toSkip) {
		if (toSkip <= in.readableBytes()) {
			in.readBytes(toSkip);
			return 0;
		}

		int remainingToSkip = toSkip - in.readableBytes();
		in.readerIndex(in.readerIndex() + in.readableBytes());

		return remainingToSkip;
	}
1017761
public long skip(long n) throws IOException
    {
        if (_closed)
            return -1;

        for (int i=0; i<n; i++)
            if (read()<0)
                return i==0?-1:i;
        return n;
    }
168951
private long skipInternal(long n) throws IOException {
    assert (stateChangeLock.isLocked());
    waitForAsyncReadComplete();
    if (isEndOfStream()) {
      return 0;
    }
    if (available() >= n) {
      // we can skip from the internal buffers
      int toSkip = (int) n;
      // We need to skip from both active buffer and read ahead buffer
      toSkip -= activeBuffer.remaining();
      assert(toSkip > 0); // skipping from activeBuffer already handled.
      activeBuffer.position(0);
      activeBuffer.flip();
      readAheadBuffer.position(toSkip + readAheadBuffer.position());
      swapBuffers();
      // Trigger async read to emptied read ahead buffer.
      readAsync();
      return n;
    } else {
      int skippedBytes = available();
      long toSkip = n - skippedBytes;
      activeBuffer.position(0);
      activeBuffer.flip();
      readAheadBuffer.position(0);
      readAheadBuffer.flip();
      long skippedFromInputStream = underlyingInputStream.skip(toSkip);
      readAsync();
      return skippedBytes + skippedFromInputStream;
    }
  }
157636
public static long skip(final InputStream inputStream, final long bytesCount) throws IOException {
    Preconditions.checkNotNull(inputStream);
    Preconditions.checkArgument(bytesCount >= 0);

    long toSkip = bytesCount;
    while (toSkip > 0) {
      final long skipped = inputStream.skip(toSkip);
      if (skipped > 0) {
        toSkip -= skipped;
        continue;
      }

      if (inputStream.read() != -1) {
        toSkip--;
        continue;
      }
      return bytesCount - toSkip;
    }

    return bytesCount;
  }
1352619
@Override
    public long skip(long n) throws IOException {
        long toSkip = max >= 0 ? Math.min(n, max - pos) : n;
        long skippedBytes = in.skip(toSkip);
        pos += skippedBytes;
        return skippedBytes;
    }
264460
private void trim() throws IOException {
        if (isTrimShouldBeExecuted()) {

            /**
             * Need to store more bufs, may it is not possible to read out all
             * data at once. The available method only returns an int value
             * instead a long value. Store all read parts of the full buffer in
             * a deque.
             */
            final Deque<byte[]> tmpBuffer = new LinkedList<>();

            int available;
            // empty the current buffer, read out all bytes
            while ((available = is.available()) > 0) {
                final byte[] buf = new byte[available];
                // read out of the buffer
                // and store the result to the tmpBuffer
                int read = is.read(buf);
                // should never happen
                assert read == available : "Read not enough bytes from buffer.";
                tmpBuffer.add(buf);
            }
            /**
             * Write all previously read parts back to the buffer. The buffer is
             * clean and contains no elements because all parts are read out.
             */
            try {
                /**
                 * The reference to the buffer deque is not reachable out of the
                 * trim method. It is possible to ignore the safeWrite flag to
                 * prevent not necessary clone operations.
                 */
                ignoreSafeWrite = true;
                while (!tmpBuffer.isEmpty()) {
                    // pollFirst returns always a non null value, tmpBuffer is only filled with non null values
                    os.write(tmpBuffer.pollFirst());
                }
            } finally {
                ignoreSafeWrite = false;
            }
        }
    }
359860
public void skipValue() throws IOException {
        skipping = true;
        try {
            int count = 0;
            do {
                JsonToken token = advance();
                if (token == JsonToken.BEGIN_ARRAY || token == JsonToken.BEGIN_OBJECT) {
                    count++;
                } else if (token == JsonToken.END_ARRAY || token == JsonToken.END_OBJECT) {
                    count--;
                }
            } while (count != 0);
        } finally {
            skipping = false;
        }
    }
469076
public static void skip(DataInputStream in) throws IOException {
        byte[] preamble = new byte[PREAMBLE.length];
        in.readFully(preamble);
        if (!Arrays.equals(preamble,PREAMBLE))
            return;    // not a valid preamble

        DataInputStream decoded = new DataInputStream(new UnbufferedBase64InputStream(in));
        int macSz = - decoded.readInt();
        if (macSz > 0) { // new format
            IOUtils.skip(decoded, macSz);
            int sz = decoded.readInt();
            IOUtils.skip(decoded, sz);
        } else { // old format
            int sz = -macSz;
            IOUtils.skip(decoded, sz);
        }

        byte[] postamble = new byte[POSTAMBLE.length];
        in.readFully(postamble);
    }