< prev index next >

src/java.base/share/classes/com/sun/java/util/jar/pack/PackageReader.java

Print this page

        

*** 73,84 **** * the maximum number of characters that future reads * can consume from the underlying stream. */ static class LimitedBuffer extends BufferedInputStream { - static final InputStream NULL_STREAM = InputStream.nullInputStream(); - long served; // total number of charburgers served int servedPos; // ...as of this value of super.pos long limit; // current declared limit long buffered; public boolean atLimit() { --- 73,82 ----
*** 123,133 **** } public long skip(long n) throws IOException { throw new RuntimeException("no skipping"); } LimitedBuffer(InputStream originalIn) { ! super(NULL_STREAM, 1<<14); servedPos = pos; super.in = new FilterInputStream(originalIn) { public int read() throws IOException { if (buffered == limit) return -1; --- 121,131 ---- } public long skip(long n) throws IOException { throw new RuntimeException("no skipping"); } LimitedBuffer(InputStream originalIn) { ! super(InputStream.nullInputStream(), 1<<14); servedPos = pos; super.in = new FilterInputStream(originalIn) { public int read() throws IOException { if (buffered == limit) return -1;
< prev index next >