jdr/jboss-as-jdr/src/main/java/org/jboss/as/jdr/util/Utils.java
public static void skip(InputStream is, long amount) throws IOException {
        long leftToSkip = amount;
        long amountSkipped = 0;
        while(leftToSkip > 0 && amountSkipped >= 0){
            amountSkipped = is.skip(leftToSkip);
            leftToSkip -= amountSkipped;
        }
    }
public static void skip(InputStream is, long amount) throws IOException {
        long leftToSkip = amount;
        long amountSkipped = 0;
        while(leftToSkip > 0 && amountSkipped >= 0){
            amountSkipped = is.skip(leftToSkip);
            leftToSkip -= amountSkipped;
        }
    }
Ensure InputStream actually skips ahead the required number of bytes
@param is
@param amount
@throws IOException