Class ReadableChannelLocking<A, X extends ReadableChannel<A>>

All Implemented Interfaces:
Closeable, AutoCloseable, Channel, HasArrayOps<A>, ReadableChannel<A>, ReadableSource<A>
Direct Known Subclasses:
ReadableChannelSwitchableBase, SeekableReadableChannelLocking

public class ReadableChannelLocking<A, X extends ReadableChannel<A>> extends ReadableChannelDecoratorBase<A,X>
  • Field Details

  • Constructor Details

    • ReadableChannelLocking

      public ReadableChannelLocking(X delegate)
  • Method Details

    • read

      public int read(A array, int position, int length) throws IOException
      Override if any actions are needed; make sure to eventually call base.read()
      Specified by:
      read in interface ReadableSource<A>
      Overrides:
      read in class ReadableChannelDecoratorBase<A, X extends 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
    • getReadWriteLock

      public ReadWriteLock getReadWriteLock()