OverlayWorker

private class OverlayWorker(val jos: JarOutputStream, val renameFor: RenameFor, val parts: OverlayParts)

One shard's writer: the inflate buffer it reuses across that shard's jars (a fresh 1MB each would be pure allocation churn), and the count of classes it contributed. Nothing is synchronized — a shard owns its output file outright, so the lock the single-overlay version needed is gone.

Constructors

Link copied to clipboard
constructor(jos: JarOutputStream, renameFor: RenameFor, parts: OverlayParts)

Properties

Link copied to clipboard
private val jos: JarOutputStream
Link copied to clipboard
private val parts: OverlayParts
Link copied to clipboard
private var readBuf: ByteArray
Link copied to clipboard
private val renameFor: RenameFor
Link copied to clipboard

Functions

Link copied to clipboard
fun widenJar(jar: File, names: List<String>)

Widen every names entry of jar into this shard. Opens its OWN ZipFile, so workers on other shards inflate independently — sharing one would serialize them all on that ZipFile's internal lock.