Class DeflateUtil

java.lang.Object
org.keycloak.saml.processing.api.util.DeflateUtil

public class DeflateUtil extends Object
Encoder of saml messages based on DEFLATE compression
Since:
Dec 11, 2008
Author:
Anil.Saldhana@redhat.com
  • Field Details

    • DEFAULT_MAX_INFLATING_SIZE

      public static long DEFAULT_MAX_INFLATING_SIZE
      Maximum size for inflating. Default is 128KB like quarkus.http.limits.max-form-attribute-size.
  • Method Details

    • encode

      public static byte[] encode(byte[] message) throws IOException
      Apply DEFLATE encoding
      Parameters:
      message -
      Returns:
      Throws:
      IOException
    • encode

      public static byte[] encode(String message) throws IOException
      Apply DEFLATE encoding
      Parameters:
      message -
      Returns:
      Throws:
      IOException
    • decode

      public static InputStream decode(byte[] msgToDecode)
      DEFLATE decoding
      Parameters:
      msgToDecode - the message that needs decoding
      Returns:
    • decode

      public static InputStream decode(byte[] msgToDecode, long maxInflatingSize)
      DEFLATE decoding
      Parameters:
      msgToDecode - the message that needs decoding
      maxInflatingSize - the maximum size to inflate, IOExceptio is thrown if more data is inflated
      Returns: