Package org.brotli.wrapper.common
Class BrotliCommon
java.lang.Object
org.brotli.wrapper.common.BrotliCommon
JNI wrapper for brotli common.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static boolean
private static final Object
private static final byte[]
private static final byte[]
private static final byte[]
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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 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
Reads data and sets it to be brotli dictionary.static void
setDictionaryData
(ByteBuffer data) Sets data to be brotli dictionary.
-
Field Details
-
RFC_DICTIONARY_SIZE
public static final int RFC_DICTIONARY_SIZE- See Also:
-
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
-
-
Constructor Details
-
BrotliCommon
public BrotliCommon()
-
-
Method Details
-
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
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
Reads data and sets it to be brotli dictionary.- Throws:
IOException
-
setDictionaryData
Sets data to be brotli dictionary.
-