public class BrotliCommon extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
RFC_DICTIONARY_SIZE |
| Constructor and Description |
|---|
BrotliCommon() |
| Modifier and Type | Method and 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 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(ByteBuffer data)
Sets data to be brotli dictionary.
|
static void |
setDictionaryData(InputStream src)
Reads data and sets it to be brotli dictionary.
|
public static final int RFC_DICTIONARY_SIZE
public static boolean checkDictionaryDataMd5(byte[] digest)
digest - digest byte arraytrue if check was successful else falsepublic static boolean checkDictionaryDataSha1(byte[] digest)
digest - digest byte arraytrue if check was successful else falsepublic static boolean checkDictionaryDataSha256(byte[] digest)
digest - digest byte arraytrue if check was successful else falsepublic static ByteBuffer makeNative(byte[] data)
Direct byte buffers are used to supply native code with large data chunks.
data - byte array of dataByteBuffer instancepublic static void setDictionaryData(byte[] data)
data - byte array of datapublic static void setDictionaryData(InputStream src) throws IOException
src - InputStream of dictionary dataIOException - In case of error during processing dictionarypublic static void setDictionaryData(ByteBuffer data)
data - ByteBuffer dictionary dataCopyright © 2024. All rights reserved.