< prev index next >

src/java.desktop/share/classes/javax/swing/ProgressMonitorInputStream.java

Print this page

        

*** 102,112 **** return monitor; } /** ! * Overrides <code>FilterInputStream.read</code> * to update the progress monitor after the read. */ public int read() throws IOException { int c = in.read(); if (c >= 0) monitor.setProgress(++nread); --- 102,112 ---- return monitor; } /** ! * Overrides {@code FilterInputStream.read} * to update the progress monitor after the read. */ public int read() throws IOException { int c = in.read(); if (c >= 0) monitor.setProgress(++nread);
*** 119,129 **** return c; } /** ! * Overrides <code>FilterInputStream.read</code> * to update the progress monitor after the read. */ public int read(byte b[]) throws IOException { int nr = in.read(b); if (nr > 0) monitor.setProgress(nread += nr); --- 119,129 ---- return c; } /** ! * Overrides {@code FilterInputStream.read} * to update the progress monitor after the read. */ public int read(byte b[]) throws IOException { int nr = in.read(b); if (nr > 0) monitor.setProgress(nread += nr);
*** 136,146 **** return nr; } /** ! * Overrides <code>FilterInputStream.read</code> * to update the progress monitor after the read. */ public int read(byte b[], int off, int len) throws IOException { --- 136,146 ---- return nr; } /** ! * Overrides {@code FilterInputStream.read} * to update the progress monitor after the read. */ public int read(byte b[], int off, int len) throws IOException {
*** 155,186 **** return nr; } /** ! * Overrides <code>FilterInputStream.skip</code> * to update the progress monitor after the skip. */ public long skip(long n) throws IOException { long nr = in.skip(n); if (nr > 0) monitor.setProgress(nread += nr); return nr; } /** ! * Overrides <code>FilterInputStream.close</code> * to close the progress monitor as well as the stream. */ public void close() throws IOException { in.close(); monitor.close(); } /** ! * Overrides <code>FilterInputStream.reset</code> * to reset the progress monitor as well as the stream. */ public synchronized void reset() throws IOException { in.reset(); nread = size - in.available(); --- 155,186 ---- return nr; } /** ! * Overrides {@code FilterInputStream.skip} * to update the progress monitor after the skip. */ public long skip(long n) throws IOException { long nr = in.skip(n); if (nr > 0) monitor.setProgress(nread += nr); return nr; } /** ! * Overrides {@code FilterInputStream.close} * to close the progress monitor as well as the stream. */ public void close() throws IOException { in.close(); monitor.close(); } /** ! * Overrides {@code FilterInputStream.reset} * to reset the progress monitor as well as the stream. */ public synchronized void reset() throws IOException { in.reset(); nread = size - in.available();
< prev index next >