Package org.apache.cassandra.io.util
Class TrackedInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- org.apache.cassandra.io.util.TrackedInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,BytesReadTracker
public class TrackedInputStream extends java.io.FilterInputStream implements BytesReadTracker
This class is to track bytes read from given DataInputStream
-
-
Constructor Summary
Constructors Constructor Description TrackedInputStream(java.io.InputStream source)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetBytesRead()intread()intread(byte[] b)intread(byte[] b, int off, int len)voidreset(long count)reset counter to @param countlongskip(long n)
-
-
-
Method Detail
-
getBytesRead
public long getBytesRead()
- Specified by:
getBytesReadin interfaceBytesReadTracker
-
reset
public void reset(long count)
reset counter to @param count- Specified by:
resetin interfaceBytesReadTracker
-
read
public int read() throws java.io.IOException- Overrides:
readin classjava.io.FilterInputStream- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException- Overrides:
readin classjava.io.FilterInputStream- Throws:
java.io.IOException
-
read
public int read(byte[] b) throws java.io.IOException- Overrides:
readin classjava.io.FilterInputStream- Throws:
java.io.IOException
-
skip
public long skip(long n) throws java.io.IOException- Overrides:
skipin classjava.io.FilterInputStream- Throws:
java.io.IOException
-
-