Class BrotliCommon


  • public class BrotliCommon
    extends java.lang.Object
    JNI wrapper for brotli common.
    • Constructor Summary

      Constructors 
      Constructor Description
      BrotliCommon()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean checkDictionaryDataMd5​(byte[] digest)
      Checks if the given checksum matches MD5 checksum of the RFC dictionary.
      static boolean checkDictionaryDataSha1​(byte[] digest)
      Checks if the given checksum matches SHA-1 checksum of the RFC dictionary.
      static boolean checkDictionaryDataSha256​(byte[] digest)
      Checks if the given checksum matches SHA-256 checksum of the RFC dictionary.
      static java.nio.ByteBuffer makeNative​(byte[] data)
      Copy bytes to a new direct ByteBuffer.
      static void setDictionaryData​(byte[] data)
      Copies data and sets it to be brotli dictionary.
      static void setDictionaryData​(java.io.InputStream src)
      Reads data and sets it to be brotli dictionary.
      static void setDictionaryData​(java.nio.ByteBuffer data)
      Sets data to be brotli dictionary.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • RFC_DICTIONARY_MD5

        private static final byte[] RFC_DICTIONARY_MD5
      • RFC_DICTIONARY_SHA_1

        private static final byte[] RFC_DICTIONARY_SHA_1
      • RFC_DICTIONARY_SHA_256

        private static final byte[] RFC_DICTIONARY_SHA_256
      • isDictionaryDataSet

        private static boolean isDictionaryDataSet
      • mutex

        private static final java.lang.Object mutex
    • Constructor Detail

      • BrotliCommon

        public BrotliCommon()
    • Method Detail

      • checkDictionaryDataMd5

        public static boolean checkDictionaryDataMd5​(byte[] digest)
        Checks if the given checksum matches MD5 checksum of the RFC dictionary.
      • checkDictionaryDataSha1

        public static boolean checkDictionaryDataSha1​(byte[] digest)
        Checks if the given checksum matches SHA-1 checksum of the RFC dictionary.
      • checkDictionaryDataSha256

        public static boolean checkDictionaryDataSha256​(byte[] digest)
        Checks if the given checksum matches SHA-256 checksum of the RFC dictionary.
      • makeNative

        public static java.nio.ByteBuffer makeNative​(byte[] data)
        Copy bytes to a new direct ByteBuffer. Direct byte buffers are used to supply native code with large data chunks.
      • setDictionaryData

        public static void setDictionaryData​(byte[] data)
        Copies data and sets it to be brotli dictionary.
      • setDictionaryData

        public static void setDictionaryData​(java.io.InputStream src)
                                      throws java.io.IOException
        Reads data and sets it to be brotli dictionary.
        Throws:
        java.io.IOException
      • setDictionaryData

        public static void setDictionaryData​(java.nio.ByteBuffer data)
        Sets data to be brotli dictionary.