MCPcopy Create free account
hub / github.com/ReadyTalk/avian / skip

Method skip

classpath/java/io/InputStream.java:36–48  ·  view source on GitHub ↗
(long count)

Source from the content-addressed store, hash-verified

34 }
35
36 public long skip(long count) throws IOException {
37 final long Max = 8 * 1024;
38 int size = (int) (count < Max ? count : Max);
39 byte[] buffer = new byte[size];
40 long remaining = count;
41 int c;
42 while ((c = read(buffer, 0, (int) (size < remaining ? size : remaining)))
43 >= 0
44 && remaining > 0) {
45 remaining -= c;
46 }
47 return count - remaining;
48 }
49
50 public int available() throws IOException {
51 return 0;

Callers

nothing calls this directly

Calls 1

readMethod · 0.95

Tested by

no test coverage detected