@FunctionalInterface public interface TarArchive
Modifier and Type | Field and Description |
---|---|
static Instant |
NORMALIZED_TIME
Instant that can be used to normalize TAR files so all entries have the
same modification time. |
Modifier and Type | Method and Description |
---|---|
static TarArchive |
fromZip(File zip,
Owner owner)
Factory method to adapt a ZIP file to
TarArchive . |
static TarArchive |
of(IOConsumer<Layout> layout)
Factory method to create a new
TarArchive instance with a specific layout. |
void |
writeTo(OutputStream outputStream)
Write the TAR archive to the given output stream.
|
void writeTo(OutputStream outputStream) throws IOException
outputStream
- the output stream to write toIOException
- on IO errorstatic TarArchive of(IOConsumer<Layout> layout)
TarArchive
instance with a specific layout.layout
- the TAR layoutTarArchive
instancestatic TarArchive fromZip(File zip, Owner owner)
TarArchive
.zip
- the source zip fileowner
- the owner of the entries in the TARTarArchive
instance