Class ReadableByteChannelFromInputStream

  • All Implemented Interfaces:
    Closeable, AutoCloseable, Channel, ReadableByteChannel
    Direct Known Subclasses:
    SeekableByteChannelFromSeekableInputStream

    public class ReadableByteChannelFromInputStream
    extends Object
    implements ReadableByteChannel
    A replacement for Channels.newChannel with the following changes for interoperability with hadoop and our GenericRecordReader: - Does not close the underlying stream on interrupt - This implementation's read method just delegates to the input stream (without additional buffering / repeated reads). This way hadoop's posititon advertising remains usable.