< prev index next >

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

Print this page

        

@@ -73,12 +73,10 @@
      *  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() {

@@ -123,11 +121,11 @@
         }
         public long skip(long n) throws IOException {
             throw new RuntimeException("no skipping");
         }
         LimitedBuffer(InputStream originalIn) {
-            super(NULL_STREAM, 1<<14);
+            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 >