- added javadoc
Kev
Index: jlink.java =================================================================== RCS file: /home/cvspublic/ant/src/main/org/apache/tools/ant/taskdefs/optional/jlink/jlink.java,v retrieving revision 1.15 diff -u -r1.15 jlink.java --- jlink.java 9 Mar 2004 16:48:30 -0000 1.15 +++ jlink.java 25 Jan 2005 11:55:10 -0000 @@ -1,5 +1,5 @@ /* - * Copyright 2000,2002-2004 The Apache Software Foundation + * Copyright 2000,2002-2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,7 +38,20 @@ public class jlink extends Object { - /** The file that will be created by this instance of jlink. */ + + private String outfile = null; + + private Vector mergefiles = new Vector(10); + + private Vector addfiles = new Vector(10); + + private boolean compression = false; + + byte[] buffer = new byte[8192]; + + /** The file that will be created by this instance of jlink. + * @param outfile the file to create + */ public void setOutfile(String outfile) { if (outfile == null) { return; @@ -47,42 +60,50 @@ } - /** Adds a file to be merged into the output. */ - public void addMergeFile(String mergefile) { - if (mergefile == null) { + /** Adds a file to be merged into the output. + * @param fileToMerge the file to merge into the output + */ + public void addMergeFile(String fileToMerge) { + if (fileToMerge == null) { return; } - mergefiles.addElement(mergefile); + mergefiles.addElement(fileToMerge); } - /** Adds a file to be added into the output. */ - public void addAddFile(String addfile) { - if (addfile == null) { + /** Adds a file to be added into the output. + * @param fileToAdd the file to add to the output + */ + public void addAddFile(String fileToAdd) { + if (fileToAdd == null) { return; } - addfiles.addElement(addfile); + addfiles.addElement(fileToAdd); } - /** Adds several files to be merged into the output. */ - public void addMergeFiles(String[] mergefiles) { - if (mergefiles == null) { + /** Adds several files to be merged into the output. + * @param filesToMerge an array of files to merge into the output + */ + public void addMergeFiles(String[] filesToMerge) { + if (filesToMerge == null) { return; } - for (int i = 0; i < mergefiles.length; i++) { - addMergeFile(mergefiles[i]); + for (int i = 0; i < filesToMerge.length; i++) { + addMergeFile(filesToMerge[i]); } } - /** Adds several file to be added into the output. */ - public void addAddFiles(String[] addfiles) { - if (addfiles == null) { + /** Adds several file to be added into the output. + * @param filesToAdd an array of files to add to the output + */ + public void addAddFiles(String[] filesToAdd) { + if (filesToAdd == null) { return; } - for (int i = 0; i < addfiles.length; i++) { - addAddFile(addfiles[i]); + for (int i = 0; i < filesToAdd.length; i++) { + addAddFile(filesToAdd[i]); } } @@ -147,6 +168,7 @@ try { output.close(); } catch (IOException ioe) { + //do nothing } } } @@ -271,11 +293,13 @@ return className.replace('.', '/') + ".class"; } } catch (IOException ioe) { + //do nothing } finally { if (input != null) { try { input.close(); } catch (IOException e) { + //do nothing } } } @@ -336,7 +360,7 @@ * The big deal is to set the right parameters in the ZipEntry * on the output stream. */ - private ZipEntry processEntry(ZipFile zip, ZipEntry inputEntry) throws IOException { + private ZipEntry processEntry(ZipFile zip, ZipEntry inputEntry) { /* First, some notes. On MRJ 2.2.2, getting the size, compressed size, and CRC32 from the @@ -361,6 +385,7 @@ name = className.replace('.', '/') + ".class"; } } catch (IOException ioe) { + //do nothing } } ZipEntry outputEntry = new ZipEntry(name); @@ -410,16 +435,6 @@ return crc.getValue(); } - - private String outfile = null; - - private Vector mergefiles = new Vector(10); - - private Vector addfiles = new Vector(10); - - private boolean compression = false; - - byte[] buffer = new byte[8192]; }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]