diff options
author | James Moger <james.moger@gitblit.com> | 2013-09-30 09:30:04 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2013-09-30 10:11:28 -0400 |
commit | 699e71e76b15081baf746c6ce9c9144f7e5f1ff9 (patch) | |
tree | 4a9ea25c258caeae3dea4bc1de809f47bc615d81 /src/main/java/com/gitblit/utils/CompressionUtils.java | |
parent | 235ad956fa84cad4fac1b2e69a0c9e4f50376ea3 (diff) | |
download | gitblit-699e71e76b15081baf746c6ce9c9144f7e5f1ff9.tar.gz gitblit-699e71e76b15081baf746c6ce9c9144f7e5f1ff9.zip |
Trim trailing whitespace and organize imports
Change-Id: I9f91138b20219be6e3c4b28251487df262bff6cc
Diffstat (limited to 'src/main/java/com/gitblit/utils/CompressionUtils.java')
-rw-r--r-- | src/main/java/com/gitblit/utils/CompressionUtils.java | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/main/java/com/gitblit/utils/CompressionUtils.java b/src/main/java/com/gitblit/utils/CompressionUtils.java index a8dcdd8f..2bf1f130 100644 --- a/src/main/java/com/gitblit/utils/CompressionUtils.java +++ b/src/main/java/com/gitblit/utils/CompressionUtils.java @@ -43,9 +43,9 @@ import org.slf4j.LoggerFactory; /**
* Collection of static methods for retrieving information from a repository.
- *
+ *
* @author James Moger
- *
+ *
*/
public class CompressionUtils {
@@ -53,7 +53,7 @@ public class CompressionUtils { /**
* Log an error message and exception.
- *
+ *
* @param t
* @param repository
* if repository is not null it MUST be the {0} parameter in the
@@ -77,7 +77,7 @@ public class CompressionUtils { /**
* Zips the contents of the tree at the (optionally) specified revision and
* the (optionally) specified basepath to the supplied outputstream.
- *
+ *
* @param repository
* @param basePath
* if unspecified, entire repository is assumed.
@@ -137,11 +137,11 @@ public class CompressionUtils { }
return success;
}
-
+
/**
* tar the contents of the tree at the (optionally) specified revision and
* the (optionally) specified basepath to the supplied outputstream.
- *
+ *
* @param repository
* @param basePath
* if unspecified, entire repository is assumed.
@@ -155,11 +155,11 @@ public class CompressionUtils { OutputStream os) {
return tar(null, repository, basePath, objectId, os);
}
-
+
/**
* tar.gz the contents of the tree at the (optionally) specified revision and
* the (optionally) specified basepath to the supplied outputstream.
- *
+ *
* @param repository
* @param basePath
* if unspecified, entire repository is assumed.
@@ -173,11 +173,11 @@ public class CompressionUtils { OutputStream os) {
return tar(CompressorStreamFactory.GZIP, repository, basePath, objectId, os);
}
-
+
/**
* tar.xz the contents of the tree at the (optionally) specified revision and
* the (optionally) specified basepath to the supplied outputstream.
- *
+ *
* @param repository
* @param basePath
* if unspecified, entire repository is assumed.
@@ -191,11 +191,11 @@ public class CompressionUtils { OutputStream os) {
return tar(CompressorStreamFactory.XZ, repository, basePath, objectId, os);
}
-
+
/**
* tar.bzip2 the contents of the tree at the (optionally) specified revision and
* the (optionally) specified basepath to the supplied outputstream.
- *
+ *
* @param repository
* @param basePath
* if unspecified, entire repository is assumed.
@@ -207,15 +207,15 @@ public class CompressionUtils { */
public static boolean bzip2(Repository repository, String basePath, String objectId,
OutputStream os) {
-
+
return tar(CompressorStreamFactory.BZIP2, repository, basePath, objectId, os);
}
-
+
/**
* Compresses/archives the contents of the tree at the (optionally)
* specified revision and the (optionally) specified basepath to the
* supplied outputstream.
- *
+ *
* @param algorithm
* compression algorithm for tar (optional)
* @param repository
@@ -233,7 +233,7 @@ public class CompressionUtils { if (commit == null) {
return false;
}
-
+
OutputStream cos = os;
if (!StringUtils.isEmpty(algorithm)) {
try {
@@ -264,7 +264,7 @@ public class CompressionUtils { continue;
}
tw.getObjectId(id, 0);
-
+
ObjectLoader loader = repository.open(id);
if (FileMode.SYMLINK == mode) {
TarArchiveEntry entry = new TarArchiveEntry(tw.getPathString(),TarArchiveEntry.LF_SYMLINK);
@@ -279,7 +279,7 @@ public class CompressionUtils { entry.setMode(mode.getBits());
entry.setModTime(modified);
entry.setSize(loader.getSize());
- tos.putArchiveEntry(entry);
+ tos.putArchiveEntry(entry);
loader.copyTo(tos);
tos.closeArchiveEntry();
}
|