Class SkipShieldingInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- org.apache.commons.compress.utils.SkipShieldingInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
@Deprecated public class SkipShieldingInputStream extends java.io.FilterInputStream
Deprecated.No longer used.A wrapper that overwritesskip(long)
and delegates toFilterInputStream.read()
instead.Some implementations of
InputStream
implementInputStream.skip(long)
in a way that throws an exception if the stream is not seekable -System.in
is known to behave that way. For such a stream it is impossible to invoke skip at all and you have to read from the stream (and discard the data read) instead. Skipping is potentially much faster than reading so we do want to invokeskip
when possible. We provide this class so you can wrap your ownInputStream
in it if you encounter problems withskip
throwing an exception.- Since:
- 1.17
-
-
Constructor Summary
Constructors Constructor Description SkipShieldingInputStream(java.io.InputStream in)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description long
skip(long n)
Deprecated.-
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, read, read, reset
-
-
-
-
Constructor Detail
-
SkipShieldingInputStream
public SkipShieldingInputStream(java.io.InputStream in)
Deprecated.
-
-
Method Detail
-
skip
public long skip(long n) throws java.io.IOException
Deprecated.- Overrides:
skip
in classjava.io.FilterInputStream
- Throws:
java.io.IOException
-
-