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 Detail

      • IS_BUGGY_JDK

        static final boolean IS_BUGGY_JDK
    • Method Detail

      • createBugfix

        static BugfixDeflater_JDK8252739 createBugfix​(java.util.zip.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()