Class InputStreamWithZeroOffsetRead
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.apache.commons.io.input.ProxyInputStream
net.sansa_stack.io.util.InputStreamWithZeroOffsetRead
- All Implemented Interfaces:
Closeable, AutoCloseable
public class InputStreamWithZeroOffsetRead
extends org.apache.commons.io.input.ProxyInputStream
Workaround for HADOOP-17453: read(bts, off, len) with off != 0 is broken in several version of BZip2Codec
Invoking read with a non-zero offset creates a in intermediate buffer to which is read with a zero offset
The content of the intermediate buffer is then copied to the requesting buffer bts at the appropriate offset.
-
Field Summary
Fields inherited from class FilterInputStream
in -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new ProxyInputStream. -
Method Summary
Methods inherited from class org.apache.commons.io.input.ProxyInputStream
afterRead, available, beforeRead, close, handleIOException, mark, markSupported, read, read, reset, skip, unwrapMethods inherited from class InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
InputStreamWithZeroOffsetRead
Constructs a new ProxyInputStream.- Parameters:
proxy- the InputStream to delegate to
-
-
Method Details
-
read
- Overrides:
readin classorg.apache.commons.io.input.ProxyInputStream- Throws:
IOException
-