public class InputStreamNoSkip extends java.io.FilterInputStream
FileInputStream has a known bug concerning it's
skip method which does not correctly report the number of bytes skipped.
This class provides a simple InputStream wrapper which ensures
all skips are in turn done as reads.| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
skip_read_buffer
Read buffer used by the skip method.
|
static int |
SKIP_READ_BUFFER_SIZE
Buffer size to use when read skipping.
|
| Constructor and Description |
|---|
InputStreamNoSkip(java.io.InputStream in)
Construct a
InputStream with the skip method
overridden. |
| Modifier and Type | Method and Description |
|---|---|
long |
skip(long n) |
public static final int SKIP_READ_BUFFER_SIZE
protected byte[] skip_read_buffer
public InputStreamNoSkip(java.io.InputStream in)
InputStream with the skip method
overridden.in - input stream to no skip onpublic long skip(long n) throws java.io.IOException
skip in class java.io.FilterInputStreamjava.io.IOExceptionCopyright © 2011–2023. All rights reserved.