@NotThreadSafe public abstract class ProgressInputStream extends com.amazonaws.internal.SdkFilterInputStream
in| Constructor and Description |
|---|
ProgressInputStream(InputStream is,
ProgressListener listener) |
ProgressInputStream(InputStream is,
ProgressListener listener,
int notifyThresHold) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
ProgressListener |
getListener() |
protected long |
getNotifiedByteCount() |
protected int |
getUnnotifiedByteCount() |
InputStream |
getWrappedInputStream() |
static InputStream |
inputStreamForRequest(InputStream is,
AmazonWebServiceRequest req)
Deprecated.
|
static InputStream |
inputStreamForRequest(InputStream is,
ProgressListener progressListener) |
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.
|
protected void |
onClose()
Defaults to behave the same as
onEOF(). |
protected void |
onEOF()
An end-of-file event is to be notified.
|
protected void |
onFirstRead()
The read method is called for the very first time.
|
protected void |
onNotifyBytesRead()
Upon notification of the number of bytes transferred since last
notification.
|
protected void |
onReset()
A reset event is to be notified.
|
int |
read() |
int |
read(byte[] b,
int off,
int len) |
void |
reset() |
abort, abortIfNeeded, available, isMetricActivated, mark, markSupported, release, skipreadpublic ProgressInputStream(InputStream is, ProgressListener listener)
public ProgressInputStream(InputStream is, ProgressListener listener, int notifyThresHold)
@Deprecated public static InputStream inputStreamForRequest(InputStream is, AmazonWebServiceRequest req)
is - the request content input streampublic 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 listenerprotected void onFirstRead()
protected void onEOF()
protected void onClose()
onEOF().protected void onReset()
protected void onNotifyBytesRead()
public int read()
throws IOException
read in class com.amazonaws.internal.SdkFilterInputStreamIOExceptionpublic void reset()
throws IOException
reset in class com.amazonaws.internal.SdkFilterInputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class com.amazonaws.internal.SdkFilterInputStreamIOExceptionpublic final InputStream getWrappedInputStream()
protected final int getUnnotifiedByteCount()
protected final long getNotifiedByteCount()
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class com.amazonaws.internal.SdkFilterInputStreamIOExceptionpublic final ProgressListener getListener()
Copyright © 2017. All rights reserved.