public class HeadBufferInputStream extends FilterInputStream
in
Constructor and Description |
---|
HeadBufferInputStream(InputStream in,
int headSize)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getHeadBuffer()
Returns the actual buffer used for accumulating the first few bytes
in the stream.
|
long |
getReadCount()
Returns the total number of bytes so far read from the base stream.
|
void |
mark(int readlimit) |
boolean |
markSupported()
Mark/reset is not supported.
|
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
void |
reset() |
long |
skip(long n) |
available, close
public HeadBufferInputStream(InputStream in, int headSize)
in
- base input streamheadSize
- size of head bufferpublic byte[] getHeadBuffer()
public long getReadCount()
public int read() throws IOException
read
in class FilterInputStream
IOException
public int read(byte[] b) throws IOException
read
in class FilterInputStream
IOException
public int read(byte[] b, int off, int len) throws IOException
read
in class FilterInputStream
IOException
public long skip(long n) throws IOException
skip
in class FilterInputStream
IOException
public boolean markSupported()
markSupported
in class FilterInputStream
public void reset() throws IOException
reset
in class FilterInputStream
IOException
public void mark(int readlimit)
mark
in class FilterInputStream
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.