public final class ByteCountInputStream
extends java.io.FilterInputStream
Modifier and Type | Field and Description |
---|---|
protected long |
byteCount |
private java.lang.String |
byteCountAccountName |
private boolean |
finished |
Modifier | Constructor and Description |
---|---|
protected |
ByteCountInputStream(java.io.InputStream inputStream) |
|
ByteCountInputStream(java.io.InputStream inputStream,
int initByteCount,
java.lang.String accountName)
Constructor of this class
|
|
ByteCountInputStream(java.io.InputStream inputStream,
java.lang.String accountName)
Constructor of this class
|
private boolean finished
protected long byteCount
private java.lang.String byteCountAccountName
protected ByteCountInputStream(java.io.InputStream inputStream)
public ByteCountInputStream(java.io.InputStream inputStream, java.lang.String accountName)
inputStream
- the InputStream
to read frompublic ByteCountInputStream(java.io.InputStream inputStream, int initByteCount, java.lang.String accountName)
inputStream
- the InputStream
to read frominitByteCount
- to initialize the bytecount with a given valuepublic final int read(byte[] b) throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
public final int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
public final int read() throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
public final long skip(long len) throws java.io.IOException
skip
in class java.io.FilterInputStream
java.io.IOException
public final long getCount()
public final java.lang.String getAccountName()
public final void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.FilterInputStream
java.io.IOException
public final void finish()