TV-Browser 3.3.3 API

util.ui.progress
Class ProgressInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by 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

Field Summary
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
ProgressInputStream(java.io.InputStream in, ProgressMonitor monitor)
          Creates the Stream
ProgressInputStream(java.io.InputStream in, ProgressMonitor monitor, int position)
          Creates the Stream
 
Method Summary
 void close()
           
 int getCurrentPosition()
           
 int read()
           
 int read(byte[] b)
           
 int read(byte[] b, int off, int len)
           
 long skip(long n)
           
 
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
 

Constructor Detail

ProgressInputStream

public ProgressInputStream(java.io.InputStream in,
                           ProgressMonitor monitor)
Creates the Stream

Parameters:
in - the underlying input stream
monitor - 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 stream
monitor - display the progress in this monitor
position - start at this position
Method Detail

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 API

TV-Browser 3.3.3, Copyright (C) 2004-2008 TV-Browser Team (dev@tvbrowser.org)