Closeable
, AutoCloseable
, Releasable
, MetricAware
@NotThreadSafe public abstract class ProgressInputStream extends SdkFilterInputStream
Constructor | Description |
---|---|
ProgressInputStream(InputStream is,
ProgressListener listener) |
|
ProgressInputStream(InputStream is,
ProgressListener listener,
int notifyThresHold) |
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
|
ProgressListener |
getListener() |
|
InputStream |
getWrappedInputStream() |
|
static InputStream |
inputStreamForRequest(InputStream is,
ProgressListener progressListener) |
Returns a new input stream decorated with progress reporting functionality
if the the progress listener is not null, otherwise it returns the same
inputstream as passed in.
|
static InputStream |
inputStreamForResponse(InputStream is,
AmazonWebServiceRequest req) |
Returns an input stream for response progress tracking purposes.
|
static InputStream |
inputStreamForResponse(InputStream is,
ProgressListener progressListener) |
Returns an input stream for response progress tracking purposes.
|
int |
read() |
|
int |
read(byte[] b,
int off,
int len) |
|
void |
reset() |
read
readAllBytes, readNBytes, transferTo
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
release
available, isMetricActivated, mark, markSupported, release, skip
public ProgressInputStream(InputStream is, ProgressListener listener)
public ProgressInputStream(InputStream is, ProgressListener listener, int notifyThresHold)
public static InputStream inputStreamForRequest(InputStream is, ProgressListener progressListener)
is
- the request content input streamprogressListener
- Optional progress listenerpublic static InputStream inputStreamForResponse(InputStream is, AmazonWebServiceRequest req)
is
- the response content input streampublic static InputStream inputStreamForResponse(InputStream is, ProgressListener progressListener)
is
- the response content input streamprogressListener
- Optional progress listenerpublic int read() throws IOException
read
in class SdkFilterInputStream
IOException
public void reset() throws IOException
reset
in class SdkFilterInputStream
IOException
public int read(byte[] b, int off, int len) throws IOException
read
in class SdkFilterInputStream
IOException
public final InputStream getWrappedInputStream()
public void close() throws IOException
close
in interface AutoCloseable
close
in interface Closeable
close
in class SdkFilterInputStream
IOException
public final ProgressListener getListener()
Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.