fixed minor bugs and wrote some javadocs.
Index: Expand.java
===================================================================
RCS file:
/home/cvspublic/jakarta-tools/ant/src/main/org/apache/tools/ant/taskdefs/Expand.java,v
retrieving revision 1.6
diff -u -r1.6 Expand.java
--- Expand.java 1999/12/31 01:26:32 1.6
+++ Expand.java 2000/01/02 22:28:19
@@ -54,18 +54,31 @@
package org.apache.tools.ant.taskdefs;
-import org.apache.tools.ant.*;
-import java.io.*;
-import java.util.zip.*;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import java.io.FileInputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.zip.ZipInputStream;
+import java.util.zip.ZipEntry;
+
/**
* Unzip a file.
*
* @author costin@dnt.ro
*/
public class Expand extends Task {
- String dest; // req
- String source; // req
+ private String dest; // req
+ private String source; // req
+ /**
+ * Do the work.
+ *
+ * @exception BuildException Thrown in unrecoverable error.
+ */
// XXX move it to util or tools
public void execute() throws BuildException {
try {
@@ -108,10 +121,21 @@
}
}
+ /**
+ * Set the destination directory. File will be unzipped into the
+ * destination directory.
+ *
+ * @param d Path to the directory.
+ */
public void setDest(String d) {
- this.dest=d;
+ this.dest = d;
}
-
+
+ /**
+ * Set the path to zip-file.
+ *
+ * @param s Path to zip-file.
+ */
public void setSrc(String s) {
this.source = s;
}
cheers,
Kare 8^)
--
Kare Nuorteva, programmer
Satama Interactive, Henry Fordin katu 6 FIN-00150 HELSINKI
tel. +3589 680 51 396, GSM +35840 57 833 57
http://www.satama.com/ http://www.satama.de/
|