public class ProgressInputStream extends SdkFilterInputStream
in| 构造器和说明 |
|---|
ProgressInputStream(InputStream is,
ProgressListener listener) |
ProgressInputStream(InputStream is,
ProgressListener listener,
int notifyThresHold) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
ProgressListener |
getListener() |
protected long |
getNotifiedByteCount() |
protected int |
getUnnotifiedByteCount() |
InputStream |
getWrappedInputStream() |
static InputStream |
inputStreamForRequest(InputStream is,
ProgressListener progressListener) |
static InputStream |
inputStreamForResponse(InputStream is,
CosServiceRequest 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, isAborted, mark, markSupported, release, skipreadpublic 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, CosServiceRequest 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 在类中 SdkFilterInputStreamIOExceptionpublic void reset()
throws IOException
reset 在类中 SdkFilterInputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read 在类中 SdkFilterInputStreamIOExceptionpublic final InputStream getWrappedInputStream()
protected final int getUnnotifiedByteCount()
protected final long getNotifiedByteCount()
public void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableclose 在类中 SdkFilterInputStreamIOExceptionpublic final ProgressListener getListener()
Copyright © 2022. All rights reserved.