public class ProgressReportingInputStream extends SdkFilterInputStream
This class could be used for both Amazon S3 and Amazon Glacier clients. The legacy Amazon Amazon S3 com.amazonaws.services.s3.internal.ProgressReportingInputStream has been deprecated in favor of this new class.
in| 构造器和说明 |
|---|
ProgressReportingInputStream(InputStream in,
ProgressListenerCallbackExecutor listenerCallbackExecutor)
Creates a new progress reporting input stream that simply wraps the
specified input stream and uses the specified listener callback executor to
asynchronously notify the listener 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 |
reset() |
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. |
available, mark, markSupported, read, skippublic ProgressReportingInputStream(InputStream in, ProgressListenerCallbackExecutor listenerCallbackExecutor)
in - The input stream to wrap.listenerCallbackExecutor - The listener callback executor that wraps 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 IOException
read 在类中 FilterInputStreamIOExceptionpublic void reset()
throws IOException
reset 在类中 FilterInputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read 在类中 FilterInputStreamIOExceptionpublic void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableclose 在类中 FilterInputStreamIOExceptionCopyright © 2016. All rights reserved.