src/share/classes/java/io/PushbackInputStream.java

Print this page

        

*** 271,281 **** * @see java.io.FilterInputStream#in * @see java.io.InputStream#available() */ public int available() throws IOException { ensureOpen(); ! return (buf.length - pos) + super.available(); } /** * Skips over and discards <code>n</code> bytes of data from this * input stream. The <code>skip</code> method may, for a variety of --- 271,285 ---- * @see java.io.FilterInputStream#in * @see java.io.InputStream#available() */ public int available() throws IOException { ensureOpen(); ! int n = buf.length - pos; ! int avail = super.available(); ! return n > (Integer.MAX_VALUE - avail) ! ? Integer.MAX_VALUE ! : n + avail; } /** * Skips over and discards <code>n</code> bytes of data from this * input stream. The <code>skip</code> method may, for a variety of