Class ReadableChannelWithLimit<A>

java.lang.Object
org.apache.jena.sparql.service.enhancer.slice.api.ReadableChannelWithLimit<A>
All Implemented Interfaces:
Closeable, AutoCloseable, Channel, HasArrayOps<A>, ReadableChannel<A>

public class ReadableChannelWithLimit<A> extends Object implements ReadableChannel<A>
  • Constructor Details

    • ReadableChannelWithLimit

      public ReadableChannelWithLimit(ReadableChannel<A> backend, long limit)
  • Method Details

    • getDelegate

      public ReadableChannel<A> getDelegate()
    • getArrayOps

      public ArrayOps<A> getArrayOps()
      Specified by:
      getArrayOps in interface HasArrayOps<A>
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Channel
      Specified by:
      close in interface Closeable
      Throws:
      IOException
    • isOpen

      public boolean isOpen()
      Specified by:
      isOpen in interface Channel
    • read

      public int read(A array, int position, int length) throws IOException
      Description copied from interface: ReadableChannel
      Read method following the usual InputStream protocol.
      Specified by:
      read in interface ReadableChannel<A>
      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