public class ProgressReportingInputStream
extends java.io.FilterInputStream
| コンストラクタと説明 |
|---|
ProgressReportingInputStream(java.io.InputStream in,
ProgressListener listener)
Creates a new progress reporting input stream that simply wraps the
specified input stream and notifies the specified listener occasionally
about the number of bytes transferred.
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
void |
close() |
boolean |
getFireCompletedEvent()
Returns whether this input stream should fire an event with code
ProgressEvent.COMPLETED_EVENT_CODE when this stream runs out of
data. |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
void |
setFireCompletedEvent(boolean fireCompletedEvent)
Sets whether this input stream should fire an event with code
ProgressEvent.COMPLETED_EVENT_CODE when this stream runs out of
data. |
public ProgressReportingInputStream(java.io.InputStream in,
ProgressListener listener)
in - The input stream to wrap.listener - The listener to notify about progress.public void setFireCompletedEvent(boolean fireCompletedEvent)
ProgressEvent.COMPLETED_EVENT_CODE when this stream runs out of
data. By default, completed events are not fired by this stream.fireCompletedEvent - Whether this input stream should fire an event to indicate
that the stream has been fully read.public boolean getFireCompletedEvent()
ProgressEvent.COMPLETED_EVENT_CODE when this stream runs out of
data. By default, completed events are not fired by this stream.public int read()
throws java.io.IOException
read クラス内 java.io.FilterInputStreamjava.io.IOExceptionpublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
read クラス内 java.io.FilterInputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close インタフェース内 java.io.Closeableclose インタフェース内 java.lang.AutoCloseableclose クラス内 java.io.FilterInputStreamjava.io.IOException