Package org.brotli.integration
Class BundleChecker
- java.lang.Object
-
- org.brotli.integration.BundleChecker
-
- All Implemented Interfaces:
java.lang.Runnable
public class BundleChecker extends java.lang.Object implements java.lang.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
Fields Modifier and Type Field Description private java.io.InputStream
input
private java.util.concurrent.atomic.AtomicInteger
nextJob
private boolean
sanityCheck
-
Constructor Summary
Constructors Constructor Description BundleChecker(java.io.InputStream input, java.util.concurrent.atomic.AtomicInteger nextJob, boolean sanityCheck)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private long
decompressAndCalculateCrc(java.util.zip.ZipInputStream input)
static void
main(java.lang.String[] args)
void
run()
-
-
-
Method Detail
-
decompressAndCalculateCrc
private long decompressAndCalculateCrc(java.util.zip.ZipInputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
run
public void run()
- Specified by:
run
in interfacejava.lang.Runnable
-
main
public static void main(java.lang.String[] args) throws java.io.FileNotFoundException
- Throws:
java.io.FileNotFoundException
-
-