Interface CertificateDecompressor

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface CertificateDecompressor
Decompresses a server's certificate chain (RFC 8879) with one of the algorithms a client offers in compress_certificate. zlib is built in (ZLIB); Brotli and zstd come from the caller, which has decoders for them.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    zlib (RFC 1950) only, with the JDK's Inflater.
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    decompress(int algorithm, byte[] data, int length)
    The chain's Certificate message body, decompressed.
    This decompressor, falling back to other for algorithms it does not have.
  • Field Details

  • Method Details

    • decompress

      byte[] decompress(int algorithm, byte[] data, int length) throws IOException
      The chain's Certificate message body, decompressed.
      Parameters:
      algorithm - the CertificateCompressionAlgorithm the server used
      data - the compressed bytes
      length - the uncompressed_length the server announced, at most 2^24
      Returns:
      exactly length bytes, or null if this decompressor has no such algorithm
      Throws:
      IOException - if the data does not decompress to length bytes
    • or

      This decompressor, falling back to other for algorithms it does not have.