mayi-common/mayi-common-core/src/main/java/com/zf1976/mayi/common/core/util/IOUtil.java
public static long skip(final InputStream input, long numToSkip) throws IOException {
        final long available = numToSkip;
        while (numToSkip > 0) {
            final long skipped = input.skip(numToSkip);
            if (skipped == 0) {
                break;
            }
            numToSkip -= skipped;
        }

        while (numToSkip > 0) {
            final int read = readFully(input, SKIP_BUF, 0,
                    (int) Math.min(numToSkip, SKIP_BUF_SIZE));
            if (read < 1) {
                break;
            }
            numToSkip -= read;
        }
        return available - numToSkip;
    }
/**
     * Skips the given number of bytes by repeatedly invoking skip on
     * the given input stream if necessary.
     *
     * <p>In a case where the stream's skip() method returns 0 before
     * the requested number of bytes has been skip this implementation
     * will fall back to using the read() method.</p>
     *
     * <p>This method will only skip less than the requested number of
     * bytes if the end of the input stream has been reached.</p>
     *
     * @param input     stream to skip bytes in
     * @param numToSkip the number of bytes to skip
     * @return the number of bytes actually skipped
     * @throws IOException on error
     */
Skips the given number of bytes by repeatedly invoking skip on
the given input stream if necessary.

In a case where the stream's skip() method returns 0 before
the requested number of bytes has been skip this implementation
will fall back to using the read() method.

This method will only skip less than the requested number of
bytes if the end of the input stream has been reached.

@param input     stream to skip bytes in
@param numToSkip the number of bytes to skip
@return the number of bytes actually skipped
@throws IOException on error
Skips the given number of bytes by repeatedly invoking skip on the given input stream if necessary . In a case where the stream ' s skip () method returns 0 before the requested number of bytes has been skip this implementation will fall back to using the read () method . This method will only skip less than the requested number of bytes if the end of the input stream has been reached . @param input stream to skip bytes in @param numToSkip the number of bytes to skip @return the number of bytes actually skipped @throws IOException on error
public static long skip(final InputStream input, long numToSkip) throws IOException {
        final long available = numToSkip;
        while (numToSkip > 0) {
            final long skipped = input.skip(numToSkip);
            if (skipped == 0) {
                break;
            }
            numToSkip -= skipped;
        }
        while (numToSkip > 0) {
            final int read = readFully(input, SKIP_BUF, 0,
                    (int) Math.min(numToSkip, SKIP_BUF_SIZE));
            if (read < 1) {
                break;
            }
            numToSkip -= read;
        }
        return available - numToSkip;
    }
public static long skip ( final InputStream input , long numToSkip ) throws IOException { final long available = numToSkip ; while ( numToSkip > 0 ) { final long skipped = input . skip ( numToSkip ) ; if ( skipped == 0 ) { break ; } numToSkip -= skipped ; } while ( numToSkip > 0 ) { final int read = readFully ( input , SKIP_BUF , 0 , ( int ) Math . min ( numToSkip , SKIP_BUF_SIZE ) ) ; if ( read < 1 ) { break ; } numToSkip -= read ; } return available - numToSkip ; }
Skips the given number of bytes by repeatedly invoking skip on
 the given input stream if necessary.
Skips the given number of bytes by repeatedly invoking skip on the given input stream if necessary .