Interface ContentEncoder

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void complete​(java.util.List<? extends Header> trailers)
      Terminates the content stream.
      boolean isCompleted()
      Returns true if the entity has been transferred in its entirety.
      int write​(java.nio.ByteBuffer src)
      Writes a portion of entity content to the underlying channel.
    • Method Detail

      • write

        int write​(java.nio.ByteBuffer src)
           throws java.io.IOException
        Writes a portion of entity content to the underlying channel.
        Parameters:
        src - The buffer from which content is to be retrieved
        Returns:
        The number of bytes read, possibly zero
        Throws:
        java.io.IOException - if I/O error occurs while writing content
      • complete

        void complete​(java.util.List<? extends Header> trailers)
               throws java.io.IOException
        Terminates the content stream.
        Throws:
        java.io.IOException - if I/O error occurs while writing content
      • isCompleted

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