public final class TarUtils extends Object
Modifier and Type | Method and Description |
---|---|
static void |
readTarGz(Path dirPath,
InputStream input)
Reads a gzipped tar archive from a stream and writes it to the given path.
|
static void |
writeTarGz(Path dirPath,
OutputStream output,
int compressionLevel)
Creates a gzipped tar archive from the given path, streaming the data to the give output
stream.
|
public static void writeTarGz(Path dirPath, OutputStream output, int compressionLevel) throws IOException, InterruptedException
dirPath
- the path to archivecompressionLevel
- the compression level to use (0 for no compression, 9 for the most
compression, or -1 for system default)output
- the output stream to write the data toIOException
InterruptedException
public static void readTarGz(Path dirPath, InputStream input) throws IOException
dirPath
- the path to write the archive toinput
- the input streamIOException
Copyright © 2023. All Rights Reserved.