Package org.apache.nifi.stream.io
Class ByteCountingInputStream
java.lang.Object
java.io.InputStream
org.apache.nifi.stream.io.ByteCountingInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate long
private long
private long
private long
private final InputStream
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Field Details
-
in
-
bytesRead
private long bytesRead -
bytesSkipped
private long bytesSkipped -
bytesReadSinceMark
private long bytesReadSinceMark -
bytesSkippedSinceMark
private long bytesSkippedSinceMark
-
-
Constructor Details
-
ByteCountingInputStream
-
ByteCountingInputStream
-
-
Method Details
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
skip
- Overrides:
skip
in classInputStream
- Throws:
IOException
-
getBytesRead
public long getBytesRead() -
getBytesSkipped
public long getBytesSkipped() -
getBytesConsumed
public long getBytesConsumed() -
mark
public void mark(int readlimit) - Overrides:
mark
in classInputStream
-
markSupported
public boolean markSupported()- Overrides:
markSupported
in classInputStream
-
reset
- Overrides:
reset
in classInputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-
available
- Overrides:
available
in classInputStream
- Throws:
IOException
-