commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tcu...@apache.org
Subject svn commit: r494364 - in /jakarta/commons/sandbox/compress/trunk/src/examples/org/apache/commons/compress/examples: BZip2Example.java Bzip2Compress.java Bzip2Uncompress.java TarExample.java ZipExample.java
Date Tue, 09 Jan 2007 10:37:52 GMT
Author: tcurdt
Date: Tue Jan  9 02:37:52 2007
New Revision: 494364

URL: http://svn.apache.org/viewvc?view=rev&rev=494364
Log:
nitpicking,
removed deprecated examples


Removed:
    jakarta/commons/sandbox/compress/trunk/src/examples/org/apache/commons/compress/examples/Bzip2Compress.java
    jakarta/commons/sandbox/compress/trunk/src/examples/org/apache/commons/compress/examples/Bzip2Uncompress.java
Modified:
    jakarta/commons/sandbox/compress/trunk/src/examples/org/apache/commons/compress/examples/BZip2Example.java
    jakarta/commons/sandbox/compress/trunk/src/examples/org/apache/commons/compress/examples/TarExample.java
    jakarta/commons/sandbox/compress/trunk/src/examples/org/apache/commons/compress/examples/ZipExample.java

Modified: jakarta/commons/sandbox/compress/trunk/src/examples/org/apache/commons/compress/examples/BZip2Example.java
URL: http://svn.apache.org/viewvc/jakarta/commons/sandbox/compress/trunk/src/examples/org/apache/commons/compress/examples/BZip2Example.java?view=diff&rev=494364&r1=494363&r2=494364
==============================================================================
--- jakarta/commons/sandbox/compress/trunk/src/examples/org/apache/commons/compress/examples/BZip2Example.java
(original)
+++ jakarta/commons/sandbox/compress/trunk/src/examples/org/apache/commons/compress/examples/BZip2Example.java
Tue Jan  9 02:37:52 2007
@@ -31,10 +31,6 @@
 
 public class BZip2Example {
 
-	public BZip2Example() {
-		super();
-	}
-	
 	/**
 	 * Compression
 	 */
@@ -98,7 +94,6 @@
 	public void decompress() {
 		Compressor decompressor;
 		try {
-//			decompressor = DecompressorFactory.BZIP2.getInstance();
 			decompressor = CompressorFactory.getInstance("bz2");
 			
 			decompressor.decompressTo( 
@@ -113,10 +108,4 @@
 		new BZip2Example().compress();
 		new BZip2Example().decompress();
 	}
-}
-
-
-
-
-
-
+}
\ No newline at end of file

Modified: jakarta/commons/sandbox/compress/trunk/src/examples/org/apache/commons/compress/examples/TarExample.java
URL: http://svn.apache.org/viewvc/jakarta/commons/sandbox/compress/trunk/src/examples/org/apache/commons/compress/examples/TarExample.java?view=diff&rev=494364&r1=494363&r2=494364
==============================================================================
--- jakarta/commons/sandbox/compress/trunk/src/examples/org/apache/commons/compress/examples/TarExample.java
(original)
+++ jakarta/commons/sandbox/compress/trunk/src/examples/org/apache/commons/compress/examples/TarExample.java
Tue Jan  9 02:37:52 2007
@@ -25,25 +25,16 @@
 import org.apache.commons.compress.ArchiveException;
 import org.apache.commons.compress.ArchiverFactory;
 
-/**
- * @author christian.grobmeier
- */
 public class TarExample {
-	/**
-	 * 
-	 */
-	public TarExample() {
-		super();
-	}
-	
+
 	/**
 	 * Example for Tar-packing
 	 */
 	public void pack() {
 		try {
 			Archive archiver = ArchiverFactory.getInstance("tar");
-			archiver.add( new File("C:\\Temp\\allclasses-frame.html"));
-			archiver.add( new File("C:\\Temp\\allclasses-frame.html.bz2"));
+			archiver.add(new File("C:\\Temp\\allclasses-frame.html"));
+			archiver.add(new File("C:\\Temp\\allclasses-frame.html.bz2"));
 			archiver.save(new File("C:\\Temp\\myTar.tar"));
 		} catch (ArchiveException e) {
 			e.printStackTrace();

Modified: jakarta/commons/sandbox/compress/trunk/src/examples/org/apache/commons/compress/examples/ZipExample.java
URL: http://svn.apache.org/viewvc/jakarta/commons/sandbox/compress/trunk/src/examples/org/apache/commons/compress/examples/ZipExample.java?view=diff&rev=494364&r1=494363&r2=494364
==============================================================================
--- jakarta/commons/sandbox/compress/trunk/src/examples/org/apache/commons/compress/examples/ZipExample.java
(original)
+++ jakarta/commons/sandbox/compress/trunk/src/examples/org/apache/commons/compress/examples/ZipExample.java
Tue Jan  9 02:37:52 2007
@@ -25,19 +25,18 @@
 import org.apache.commons.compress.ArchiveException;
 import org.apache.commons.compress.ArchiverFactory;
 
-/**
- * Example for how to use the TarArchive 
- */
+
 public class ZipExample {
+
 	/**
 	 * Example for an pack operation 
 	 */
 	public void pack() {
 		try {
 			Archive archiver = ArchiverFactory.getInstance("zip");
-			archiver.add(	new File("C:\\Temp\\1.html"));
-			archiver.add(	new File("C:\\Temp\\1.html.bz2"));
-			archiver.save(	new File("C:\\Temp\\ZIPTEST.zip"));
+			archiver.add(new File("C:\\Temp\\1.html"));
+			archiver.add(new File("C:\\Temp\\1.html.bz2"));
+			archiver.save(new File("C:\\Temp\\ZIPTEST.zip"));
 		} catch (ArchiveException e) {
 			e.printStackTrace();
 		} catch (FileNotFoundException e) {
@@ -50,9 +49,8 @@
 	 */
 	public void unpack() {
 		try {
-			Archive archiver = ArchiverFactory.getInstance(
-					new File("C:\\Temp\\ZIPTEST.zip"));
-			archiver.unpack( new File("C:\\Temp\\unpacked\\"));
+			Archive archiver = ArchiverFactory.getInstance(new File("C:\\Temp\\ZIPTEST.zip"));
+			archiver.unpack(new File("C:\\Temp\\unpacked\\"));
 		} catch (ArchiveException e) {
 			e.printStackTrace();
 		}



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message