com.atlassian.jira.task
Class ProgressMonitoringFileInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by com.atlassian.jira.task.ProgressMonitoringFileInputStream
All Implemented Interfaces:
Closeable

public class ProgressMonitoringFileInputStream
extends FilterInputStream

A FileInputStream that can log progress when the inputstream is being read. The passed in task progress sink should have been provided with the overall file size to be read already to provide meaningful updates since the underlying inputstream implementation may not return the overall size of the data to be read reliably.

Since:
v4.4

Field Summary
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
ProgressMonitoringFileInputStream(InputStream in, TaskProgressSink taskProgressSink, String subTask, String message)
           
 
Method Summary
 int read()
           
 int read(byte[] b)
           
 int read(byte[] b, int off, int len)
           
 
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProgressMonitoringFileInputStream

public ProgressMonitoringFileInputStream(InputStream in,
                                         TaskProgressSink taskProgressSink,
                                         String subTask,
                                         String message)
Method Detail

read

public int read()
         throws IOException
Overrides:
read in class FilterInputStream
Throws:
IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Overrides:
read in class FilterInputStream
Throws:
IOException

read

public int read(byte[] b)
         throws IOException
Overrides:
read in class FilterInputStream
Throws:
IOException


Copyright © 2002-2012 Atlassian. All Rights Reserved.