Events/Java/minified-java
ExtractArchiveEvent
Gets fired while a downloaded Java archive is being extracted
Fields
archiveTypeArchiveTypeThe archive format currently being extracted
progressintThe extraction progress in percent, from 0 to 100
Types
ArchiveType
APIzipThe archive is a ZIP filetarGzThe archive is a gzipped tarballWhen it fires
This fires immediately after JavaArchiveDownloadEvent finishes and the archive's checksum has been verified. Which archive format is used - zip or tarGz - depends on the Adoptium asset for the current platform (Windows typically ships .zip, Linux/macOS typically ship .tar.gz).
Both formats always post a progress: 0 event right at the start. After that:
zipextraction reports whole-percent progress (0-100) throttled to roughly every 100ms, based on the number of ZIP entries processed - the last entry always forces a final event even if it lands inside the 100ms window, so you're guaranteed to seeprogress: 100.tar.gzextraction estimates progress from compressed bytes read through the gzip stream (capped at99until fully done, since tar entries don't have a fixed upfront total), and posts a guaranteed finalprogress: 100event once the whole stream has been consumed. If the archive size can't be determined,progressis reported as-1for the in-between events.
Listening
Subscribe on the EventBus the event is posted to, see Events for which bus that is.
eventBus.subscribe(ExtractArchiveEvent.class, event -> {
ArchiveType archiveType = event.archiveType();
int progress = event.progress();
});eventBus.subscribe(ExtractArchiveEvent::class.java) { event ->
val archiveType = event.archiveType()
val progress = event.progress()
}Posted by
JavaManagerJavaManager.java:686JavaManagerJavaManager.java:707JavaManagerJavaManager.java:721JavaManagerJavaManager.java:757JavaManagerJavaManager.java:762
API reference: com.dervarex.minified.java.events.extract.ExtractArchiveEvent