util.ui.progress
Class ProgressInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
util.ui.progress.ProgressInputStream
- All Implemented Interfaces:
- java.io.Closeable
public class ProgressInputStream
- extends java.io.FilterInputStream
This inputstream can display the current position of a file using a
ProgressMonitor.
- Since:
- 2.7
Fields inherited from class java.io.FilterInputStream |
in |
Methods inherited from class java.io.FilterInputStream |
available, mark, markSupported, reset |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProgressInputStream
public ProgressInputStream(java.io.InputStream in,
ProgressMonitor monitor)
- Creates the Stream
- Parameters:
in
- the underlying input streammonitor
- display the progress in this monitor
ProgressInputStream
public ProgressInputStream(java.io.InputStream in,
ProgressMonitor monitor,
int position)
- Creates the Stream
- Parameters:
in
- the underlying input streammonitor
- display the progress in this monitorposition
- start at this position
read
public int read()
throws java.io.IOException
- Overrides:
read
in class java.io.FilterInputStream
- Throws:
java.io.IOException
read
public int read(byte[] b)
throws java.io.IOException
- Overrides:
read
in class java.io.FilterInputStream
- Throws:
java.io.IOException
read
public int read(byte[] b,
int off,
int len)
throws java.io.IOException
- Overrides:
read
in class java.io.FilterInputStream
- Throws:
java.io.IOException
skip
public long skip(long n)
throws java.io.IOException
- Overrides:
skip
in class java.io.FilterInputStream
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Overrides:
close
in class java.io.FilterInputStream
- Throws:
java.io.IOException
getCurrentPosition
public int getCurrentPosition()
TV-Browser 3.3.3, Copyright (C) 2004-2008 TV-Browser Team (dev@tvbrowser.org)