Class BytesReadTrackingInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- software.amazon.awssdk.core.io.SdkFilterInputStream
-
- software.amazon.awssdk.core.internal.metrics.BytesReadTrackingInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Releasable,software.amazon.awssdk.http.Abortable
public final class BytesReadTrackingInputStream extends SdkFilterInputStream implements software.amazon.awssdk.http.Abortable
-
-
Field Summary
-
Fields inherited from class java.io.FilterInputStream
in
-
-
Constructor Summary
Constructors Constructor Description BytesReadTrackingInputStream(software.amazon.awssdk.http.AbortableInputStream in, AtomicLong bytesRead)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabort()Can be used to provide abortion logic prior to throwing the AbortedException.longbytesRead()intread()intread(byte[] b)intread(byte[] b, int off, int len)longskip(long n)-
Methods inherited from class software.amazon.awssdk.core.io.SdkFilterInputStream
abortIfNeeded, available, close, mark, markSupported, release, reset
-
-
-
-
Constructor Detail
-
BytesReadTrackingInputStream
public BytesReadTrackingInputStream(software.amazon.awssdk.http.AbortableInputStream in, AtomicLong bytesRead)
-
-
Method Detail
-
bytesRead
public long bytesRead()
-
read
public int read() throws IOException- Overrides:
readin classSdkFilterInputStream- Throws:
IOException
-
read
public int read(byte[] b, int off, int len) throws IOException- Overrides:
readin classSdkFilterInputStream- Throws:
IOException
-
skip
public long skip(long n) throws IOException- Overrides:
skipin classSdkFilterInputStream- Throws:
IOException
-
read
public int read(byte[] b) throws IOException- Overrides:
readin classFilterInputStream- Throws:
IOException
-
abort
public void abort()
Description copied from class:SdkFilterInputStreamCan be used to provide abortion logic prior to throwing the AbortedException. No-op by default.- Specified by:
abortin interfacesoftware.amazon.awssdk.http.Abortable- Overrides:
abortin classSdkFilterInputStream
-
-