Interface Decoder

All Superinterfaces:
Indexed<String>

public interface Decoder extends Indexed<String>
Decodes an HTTP message entity input stream.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Map<String,Decoder>
    Mapping of supported codings to associated decoders.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns an instance of an input stream that decodes the specified input.
    Returns the coding that the decoder supports, as it would appear in the Content-Encoding header.
  • Field Details

    • SERVICES

      static final Map<String,Decoder> SERVICES
      Mapping of supported codings to associated decoders.
  • Method Details

    • getKey

      String getKey()
      Returns the coding that the decoder supports, as it would appear in the Content-Encoding header.
      Specified by:
      getKey in interface Indexed<String>
      Returns:
      The coding that the decoder supports, as it would appear in the Content-Encoding header.
    • decode

      InputStream decode(InputStream in) throws IOException
      Returns an instance of an input stream that decodes the specified input.
      Parameters:
      in - The input stream to be decoded.
      Returns:
      an input stream exposing the decoded content.
      Throws:
      IOException - If an I/O exception occurs during decoding.