* Not thread-safe.
*/
public static void registerAll() {
- register("tar", new TarFormat());
- register("tgz", new TgzFormat());
- register("tbz2", new Tbz2Format());
- register("txz", new TxzFormat());
- register("zip", new ZipFormat());
+ register("tar", new TarFormat()); //$NON-NLS-1$
+ register("tgz", new TgzFormat()); //$NON-NLS-1$
+ register("tbz2", new Tbz2Format()); //$NON-NLS-1$
+ register("txz", new TxzFormat()); //$NON-NLS-1$
+ register("zip", new ZipFormat()); //$NON-NLS-1$
}
/**
* Unix TAR format (ustar + some PAX extensions).
*/
public class TarFormat implements ArchiveCommand.Format<ArchiveOutputStream> {
- private static final List<String> SUFFIXES =
- Collections.unmodifiableList(Arrays.asList(".tar"));
+ private static final List<String> SUFFIXES = Collections
+ .unmodifiableList(Arrays.asList(".tar")); //$NON-NLS-1$
public ArchiveOutputStream createArchiveOutputStream(OutputStream s) {
TarArchiveOutputStream out = new TarArchiveOutputStream(s, "UTF-8"); //$NON-NLS-1$
* bzip2-compressed tarball (tar.bz2) format.
*/
public class Tbz2Format implements ArchiveCommand.Format<ArchiveOutputStream> {
- private static final List<String> SUFFIXES =
- Collections.unmodifiableList(Arrays.asList(
- ".tar.bz2", ".tbz", ".tbz2"));
+ private static final List<String> SUFFIXES = Collections
+ .unmodifiableList(Arrays.asList(".tar.bz2", ".tbz", ".tbz2")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
private final ArchiveCommand.Format<ArchiveOutputStream> tarFormat = new TarFormat();
* gzip-compressed tarball (tar.gz) format.
*/
public class TgzFormat implements ArchiveCommand.Format<ArchiveOutputStream> {
- private static final List<String> SUFFIXES =
- Collections.unmodifiableList(Arrays.asList(
- ".tar.gz", ".tgz"));
+ private static final List<String> SUFFIXES = Collections
+ .unmodifiableList(Arrays.asList(".tar.gz", ".tgz")); //$NON-NLS-1$ //$NON-NLS-2$
private final ArchiveCommand.Format<ArchiveOutputStream> tarFormat = new TarFormat();
* Xz-compressed tar (tar.xz) format.
*/
public class TxzFormat implements ArchiveCommand.Format<ArchiveOutputStream> {
- private static final List<String> SUFFIXES =
- Collections.unmodifiableList(Arrays.asList(
- ".tar.xz", ".txz"));
+ private static final List<String> SUFFIXES = Collections
+ .unmodifiableList(Arrays.asList(".tar.xz", ".txz")); //$NON-NLS-1$ //$NON-NLS-2$
private final ArchiveCommand.Format<ArchiveOutputStream> tarFormat = new TarFormat();
* PKWARE's ZIP format.
*/
public class ZipFormat implements ArchiveCommand.Format<ArchiveOutputStream> {
- private static final List<String> SUFFIXES =
- Collections.unmodifiableList(Arrays.asList(".zip"));
+ private static final List<String> SUFFIXES = Collections
+ .unmodifiableList(Arrays.asList(".zip")); //$NON-NLS-1$
public ArchiveOutputStream createArchiveOutputStream(OutputStream s) {
return new ZipArchiveOutputStream(s);
@Override
public String toString() {
if (metaVar() == null)
- return "ARG";
+ return "ARG"; //$NON-NLS-1$
try {
Field field = CLIText.class.getField(metaVar());
String ret = field.get(CLIText.get()).toString();
}
private <T extends Closeable> OutputStream writeArchive(Format<T> fmt) {
- final String pfx = prefix == null ? "" : prefix;
+ final String pfx = prefix == null ? "" : prefix; //$NON-NLS-1$
final TreeWalk walk = new TreeWalk(repo);
try {
final T outa = fmt.createArchiveOutputStream(out);
Locale.US);
break;
case LOCAL:
- dateTimeInstance = new SimpleDateFormat("EEE MMM dd HH:mm:ss yyyy",
+ dateTimeInstance = new SimpleDateFormat("EEE MMM dd HH:mm:ss yyyy", //$NON-NLS-1$
Locale.US);
break;
case RFC:
SHORT_WITH_DOTS("yyyy.MM.dd"), // //$NON-NLS-1$
SHORT_WITH_SLASH("MM/dd/yyyy"), // //$NON-NLS-1$
DEFAULT("EEE MMM dd HH:mm:ss yyyy Z"), // //$NON-NLS-1$
- LOCAL("EEE MMM dd HH:mm:ss yyyy");
+ LOCAL("EEE MMM dd HH:mm:ss yyyy"); //$NON-NLS-1$
String formatStr;