Interface HttpEncoding

  • All Known Implementing Classes:
    GZipEncoding

    public interface HttpEncoding
    HTTP content encoding.

    Implementations don't need to be thread-safe.

    Since:
    1.14
    Author:
    Yaniv Inbar
    • Method Detail

      • getName

        String getName()
        Returns the content encoding name (for example "gzip") or null for none.
      • encode

        void encode​(StreamingContent content,
                    OutputStream out)
             throws IOException
        Encodes the streaming content into the output stream.

        Implementations must not close the output stream, and instead should flush the output stream. Some callers may assume that the the output stream has not been closed, and will fail to work if it has been closed.

        Parameters:
        content - streaming content
        out - output stream
        Throws:
        IOException