Interface BugfixDeflater_JDK8252739

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

@FunctionalInterface interface BugfixDeflater_JDK8252739
This class is a workaround for JDK bug JDK-8252739.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final boolean
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates a bugfix for Deflater instances, which works around JDK-8252739.
    private static boolean
     
    void
    setDictionary(byte[] dictBytes, int off, int len)
    Call this method as a workaround
  • Field Details

    • IS_BUGGY_JDK

      static final boolean IS_BUGGY_JDK
  • Method Details

    • createBugfix

      static BugfixDeflater_JDK8252739 createBugfix(Deflater deflater)
      Creates a bugfix for Deflater instances, which works around JDK-8252739.

      Use this whenever you intend to call Deflater.setDictionary(byte[], int, int) on a Deflater.

    • setDictionary

      void setDictionary(byte[] dictBytes, int off, int len)
      Call this method as a workaround
    • detectBuggyJDK

      private static boolean detectBuggyJDK()