Interface ContentDecoder

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean isCompleted()
      Returns true if the entity has been received in its entirety.
      int read​(java.nio.ByteBuffer dst)
      Reads a portion of content from the underlying channel
    • Method Detail

      • read

        int read​(java.nio.ByteBuffer dst)
          throws java.io.IOException
        Reads a portion of content from the underlying channel
        Parameters:
        dst - The buffer into which entity content is to be transferred
        Returns:
        The number of bytes read, possibly zero, or -1 if the channel has reached end-of-stream
        Throws:
        java.io.IOException - if I/O error occurs while reading content
      • isCompleted

        boolean isCompleted()
        Returns true if the entity has been received in its entirety.
        Returns:
        true if all the content has been consumed, false otherwise.