public class ByteCountingInputStream extends InputStream
| Modifier and Type | Field and Description |
|---|---|
private long |
bytesRead |
private long |
bytesReadSinceMark |
private long |
bytesSkipped |
private long |
bytesSkippedSinceMark |
private InputStream |
in |
| Constructor and Description |
|---|
ByteCountingInputStream(InputStream in) |
ByteCountingInputStream(InputStream in,
long initialOffset) |
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
long |
getBytesConsumed() |
long |
getBytesRead() |
long |
getBytesSkipped() |
void |
mark(int readlimit) |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
void |
reset() |
long |
skip(long n) |
private final InputStream in
private long bytesRead
private long bytesSkipped
private long bytesReadSinceMark
private long bytesSkippedSinceMark
public ByteCountingInputStream(InputStream in)
public ByteCountingInputStream(InputStream in, long initialOffset)
public int read()
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] b)
throws IOException
read in class InputStreamIOExceptionpublic long skip(long n)
throws IOException
skip in class InputStreamIOExceptionpublic long getBytesRead()
public long getBytesSkipped()
public long getBytesConsumed()
public void mark(int readlimit)
mark in class InputStreampublic boolean markSupported()
markSupported in class InputStreampublic void reset()
throws IOException
reset in class InputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOExceptionpublic int available()
throws IOException
available in class InputStreamIOExceptionCopyright © 2023 Apache NiFi Project. All rights reserved.