Interface ReadableSource<A>

All Superinterfaces:
HasArrayOps<A>
All Known Subinterfaces:
ReadableChannel<A>, SeekableReadableChannel<A>
All Known Implementing Classes:
BufferOverReadableChannel.Channel, ReadableChannelBase, ReadableChannelConcat, ReadableChannelDecoratorBase, ReadableChannelLocking, ReadableChannelOverIterator, ReadableChannelOverNio, ReadableChannelOverReadableSource, ReadableChannelOverSliceAccessor, ReadableChannelOverSliceWithCache, ReadableChannelSwitchable, ReadableChannelSwitchableBase, ReadableChannelTracker, ReadableChannelWithConditionalBound, ReadableChannelWithCounter, ReadableChannelWithLimit, ReadableChannelWithLimitByDelimiter, ReadableChannelWithSkipDelimiter, ReadableChannelWithValue, ReadableSourceOverByteBuffer, RingBufferBase, RingBufferForBytes, SeekableReadableChannelBase, SeekableReadableChannelDecoratorBase, SeekableReadableChannelLocking, SeekableReadableChannelOmitBlockMarker, SeekableReadableChannelOverBuffer, SeekableReadableChannelOverNio, SeekableReadableChannelOverReadableChannel, SeekableReadableChannelSwitchable, SeekableReadableChannelWithLimit, SeekableReadableChannelWithMonitor, SeekableReadableChannelWithOffset

public interface ReadableSource<A> extends HasArrayOps<A>
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    read(A array, int position, int length)
    Read method following the usual InputStream protocol.
    default int
    readRaw(Object array, int position, int length)
     

    Methods inherited from interface org.aksw.commons.io.buffer.array.HasArrayOps

    getArrayOps
  • Method Details

    • read

      int read(A array, int position, int length) throws IOException
      Read method following the usual InputStream protocol.
      Parameters:
      array - The array into which to put the read data
      position - Offset into array where to start writing
      length - Maximum number of items to read.
      Returns:
      The number of items read. Return -1 if end of data was reached, and 0 iff length was 0.
      Throws:
      IOException
    • readRaw

      default int readRaw(Object array, int position, int length) throws IOException
      Throws:
      IOException