public final class TarFormat extends BaseFormat implements ArchiveCommand.Format<org.apache.commons.compress.archivers.ArchiveOutputStream>
Modifier and Type | Field and Description |
---|---|
private static java.util.List<java.lang.String> |
SUFFIXES |
Constructor and Description |
---|
TarFormat() |
Modifier and Type | Method and Description |
---|---|
org.apache.commons.compress.archivers.ArchiveOutputStream |
createArchiveOutputStream(java.io.OutputStream s)
Start a new archive.
|
org.apache.commons.compress.archivers.ArchiveOutputStream |
createArchiveOutputStream(java.io.OutputStream s,
java.util.Map<java.lang.String,java.lang.Object> o)
Start a new archive.
|
boolean |
equals(java.lang.Object other) |
int |
hashCode() |
void |
putEntry(org.apache.commons.compress.archivers.ArchiveOutputStream out,
ObjectId tree,
java.lang.String path,
FileMode mode,
ObjectLoader loader)
Write an entry to an archive.
|
java.lang.Iterable<java.lang.String> |
suffixes()
Filename suffixes representing this format (e.g.,
{ ".tar.gz", ".tgz" }).
|
applyFormatOptions
public org.apache.commons.compress.archivers.ArchiveOutputStream createArchiveOutputStream(java.io.OutputStream s) throws java.io.IOException
createArchiveOutputStream
in interface ArchiveCommand.Format<org.apache.commons.compress.archivers.ArchiveOutputStream>
s
- underlying output stream to which to write the archive.java.io.IOException
- thrown by the underlying output stream for I/O errorspublic org.apache.commons.compress.archivers.ArchiveOutputStream createArchiveOutputStream(java.io.OutputStream s, java.util.Map<java.lang.String,java.lang.Object> o) throws java.io.IOException
createArchiveOutputStream
in interface ArchiveCommand.Format<org.apache.commons.compress.archivers.ArchiveOutputStream>
s
- underlying output stream to which to write the archive.o
- options to apply to the underlying output stream. Keys are
option names and values are option values.java.io.IOException
- thrown by the underlying output stream for I/O errorspublic void putEntry(org.apache.commons.compress.archivers.ArchiveOutputStream out, ObjectId tree, java.lang.String path, FileMode mode, ObjectLoader loader) throws java.io.IOException
putEntry
in interface ArchiveCommand.Format<org.apache.commons.compress.archivers.ArchiveOutputStream>
out
- archive object from createArchiveOutputStreamtree
- the tag, commit, or tree object to produce an archive forpath
- full filename relative to the root of the archive (with
trailing '/' for directories)mode
- mode (for example FileMode.REGULAR_FILE or
FileMode.SYMLINK)loader
- blob object with data for this entry (null for
directories)java.io.IOException
- thrown by the underlying output stream for I/O errorspublic java.lang.Iterable<java.lang.String> suffixes()
suffixes
in interface ArchiveCommand.Format<org.apache.commons.compress.archivers.ArchiveOutputStream>
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object