T - type representing an archive being created.public static interface ArchiveCommand.Format<T extends Closeable>
| Modifier and Type | Method and Description |
|---|---|
T |
createArchiveOutputStream(OutputStream s)
Start a new archive.
|
T |
createArchiveOutputStream(OutputStream s,
Map<String,Object> o)
Start a new archive.
|
void |
putEntry(T out,
ObjectId tree,
String path,
FileMode mode,
ObjectLoader loader)
Write an entry to an archive.
|
Iterable<String> |
suffixes()
Filename suffixes representing this format (e.g.,
{ ".tar.gz", ".tgz" }).
|
T createArchiveOutputStream(OutputStream s) throws IOException
s - underlying output stream to which to write the archive.IOException - thrown by the underlying output stream for I/O errorsT createArchiveOutputStream(OutputStream s, Map<String,Object> o) throws 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.IOException - thrown by the underlying output stream for I/O errorsvoid putEntry(T out, ObjectId tree, String path, FileMode mode, ObjectLoader loader) throws 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)IOException - thrown by the underlying output stream for I/O errorsCopyright © 2018 Eclipse JGit Project. All rights reserved.