public class TarStreamBuilder extends Object
| Constructor and Description |
|---|
TarStreamBuilder() |
| Modifier and Type | Method and Description |
|---|---|
void |
addBlobEntry(Blob blob,
long size,
String name)
Adds a blob to the archive.
|
void |
addByteEntry(byte[] contents,
String name)
Adds a blob to the archive.
|
void |
addTarArchiveEntry(org.apache.commons.compress.archivers.tar.TarArchiveEntry entry)
Adds a
TarArchiveEntry to the archive. |
void |
writeAsTarArchiveTo(OutputStream out)
Writes each entry in the filesystem to the tarball archive stream.
|
public void writeAsTarArchiveTo(OutputStream out) throws IOException
out - the stream to write to.IOException - if building the tarball fails.public void addTarArchiveEntry(org.apache.commons.compress.archivers.tar.TarArchiveEntry entry)
TarArchiveEntry to the archive.entry - the TarArchiveEntrypublic void addByteEntry(byte[] contents,
String name)
addTarArchiveEntry(org.apache.commons.compress.archivers.tar.TarArchiveEntry).contents - the bytes to add to the tarballname - the name of the entry (i.e. filename)public void addBlobEntry(Blob blob, long size, String name)
Blobs; for
adding files to the archive, use addTarArchiveEntry(org.apache.commons.compress.archivers.tar.TarArchiveEntry).blob - the Blob to add to the tarballsize - the size (in bytes) of blobname - the name of the entry (i.e. filename)Copyright © 2019. All rights reserved.