T
- type representing an archive being created.public static interface ArchiveCommand.Format<T extends java.io.Closeable>
Modifier and Type | Method and Description |
---|---|
T |
createArchiveOutputStream(java.io.OutputStream s)
Start a new archive.
|
T |
createArchiveOutputStream(java.io.OutputStream s,
java.util.Map<java.lang.String,java.lang.Object> o)
Start a new archive.
|
void |
putEntry(T 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" }).
|
T createArchiveOutputStream(java.io.OutputStream s) throws java.io.IOException
s
- underlying output stream to which to write the archive.java.io.IOException
- thrown by the underlying output stream for I/O errorsT createArchiveOutputStream(java.io.OutputStream s, java.util.Map<java.lang.String,java.lang.Object> o) throws java.io.IOException
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 errorsvoid putEntry(T out, ObjectId tree, java.lang.String path, FileMode mode, ObjectLoader loader) throws java.io.IOException
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 errorsjava.lang.Iterable<java.lang.String> suffixes()