Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import java.io.IOException;
import java.io.InputStream;

public class Main {

    public static long skip(InputStream in, long len) throws IOException {
        if (len <= 0) {
            return 0;
        }
        long r;
        long t = 0;
        while ((r = in.skip(len - t)) != 0) {
            t += r;
            if (t == len) {
                break;
            }
        }
        return t;
    }
}