Package org.brotli.integration
Class BundleChecker
java.lang.Object
org.brotli.integration.BundleChecker
- All Implemented Interfaces:
Runnable
Decompress files and (optionally) checks their checksums.
File are read from ZIP archive passed as an array of bytes. Multiple checkers negotiate about task distribution via shared AtomicInteger counter.
All entries are expected to be valid brotli compressed streams and output CRC64 checksum is expected to match the checksum hex-encoded in the first part of entry name.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final InputStream
private final AtomicInteger
private final boolean
-
Constructor Summary
ConstructorsConstructorDescriptionBundleChecker
(InputStream input, AtomicInteger nextJob, boolean sanityCheck) -
Method Summary
-
Field Details
-
nextJob
-
input
-
sanityCheck
private final boolean sanityCheck
-
-
Constructor Details
-
BundleChecker
- Parameters:
sanityCheck
- do not calculate checksum and ignoreIOException
.
-
-
Method Details
-
decompressAndCalculateCrc
- Throws:
IOException
-
run
public void run() -
main
- Throws:
FileNotFoundException
-