Class ChannelAsyncInputStream.IoReadFutureImpl

    • Field Detail

    • Constructor Detail

      • IoReadFutureImpl

        public IoReadFutureImpl​(java.lang.Object id,
                                Buffer buffer)
    • Method Detail

      • verify

        public IoReadFuture verify​(long timeoutMillis,
                                   CancelOption... options)
                            throws java.io.IOException
        Description copied from interface: VerifiableFuture
        Wait and verify that the operation was successful
        Specified by:
        verify in interface VerifiableFuture<IoReadFuture>
        Parameters:
        timeoutMillis - Wait timeout in milliseconds
        options - Optional CancelOptions defining the behavior on time-out or interrupt; ignored if the future is not Cancellable.
        Returns:
        The (same) future instance
        Throws:
        java.io.IOException - If failed to verify successfully on time
      • getRead

        public int getRead()
        Description copied from interface: IoReadFuture
        Retrieves the number of bytes read.
        Specified by:
        getRead in interface IoReadFuture
        Returns:
        The number of bytes read, or -1 if the source of the read has been exhausted (is at EOF), or zero if the read is not done yet (WaitableFuture.isDone() == false)
      • getException

        public java.lang.Throwable getException()
        Description copied from interface: IoReadFuture
        Returns the cause of the read failure. An EOFException indicates that nothing was read because the source of the read is exhausted.
        Specified by:
        getException in interface IoReadFuture
        Returns:
        null if the read operation is not finished yet, or if the read attempt is successful (use WaitableFuture.isDone() to distinguish between the two).