Interface IoReadFuture

All Superinterfaces:
SshFuture<IoReadFuture>, VerifiableFuture<IoReadFuture>, WaitableFuture
All Known Implementing Classes:
ChannelAsyncInputStream.IoReadFutureImpl

public interface IoReadFuture extends SshFuture<IoReadFuture>, VerifiableFuture<IoReadFuture>
  • Method Details

    • getBuffer

      Buffer getBuffer()
      Retrieves the buffer data was read into.
      Returns:
      the buffer, null if WaitableFuture.isDone() == false
    • getRead

      int getRead()
      Retrieves the number of bytes read.
      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

      Throwable getException()
      Returns the cause of the read failure. An EOFException indicates that nothing was read because the source of the read is exhausted.
      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).