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 longprivate longprivate longprivate longprivate 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:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
skip
- Overrides:
skipin classInputStream- Throws:
IOException
-
getBytesRead
public long getBytesRead() -
getBytesSkipped
public long getBytesSkipped() -
getBytesConsumed
public long getBytesConsumed() -
mark
public void mark(int readlimit) - Overrides:
markin classInputStream
-
markSupported
public boolean markSupported()- Overrides:
markSupportedin classInputStream
-
reset
- Overrides:
resetin classInputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
available
- Overrides:
availablein classInputStream- Throws:
IOException
-