collectFiles(file, v);
    public GenerateHTMLIndex(String jSDir, String destDir) {        if (jSDir == null) {            throw new BuildException("jSDir attribute can't be empty");        }        if (destDir == null) {            throw new BuildException("destDir can't be empty");        }        if (!"/".equals(jSDir.substring(jSDir.length() - 1))) {            jSDir = jSDir + "/";        }        if (!"/".equals(destDir.substring(destDir.length() - 1))) {            destDir = destDir + "/";        }        file = new File(jSDir);        fileList = file.listFiles();        for (int i = 0; i < fileList.length; i++) {            if (fileList[i].getName().indexOf(".js") != -1) {                v.addElement(fileList[i]);            }        }        try {            fos = new FileOutputStream(destDir + "index.htm");        } catch (FileNotFoundException fnfe) {            try {                file = new File(destDir);                file.mkdir();                fos = new FileOutputStream(destDir + "index.htm");            } catch (FileNotFoundException e) {            }        }        try {            fos.write(("<html>" + LINE_SEPARATOR).getBytes());            fos.write(("<head>" + LINE_SEPARATOR).getBytes());            fos.write(("<style type='text/css'>" + LINE_SEPARATOR).getBytes());            fos.write((".TableHeadingColor     { background: #CCCCFF } /* Dark mauve */" + LINE_SEPARATOR).getBytes());            fos.write((".NavBarCell1    { background-color:#EEEEFF;}/* Light mauve */" + LINE_SEPARATOR).getBytes());            fos.write(("</style>" + LINE_SEPARATOR).getBytes());            fos.write(("<TABLE WIDTH='100%'><TR><TD WIDTH='100%' CLASS='NavBarCell1'><H1>JavaScript Code Documentation</H1></TD></TR></TABLE>" + LINE_SEPARATOR).getBytes());            fos.write(("<title>JavaScript Code Documentation</title>" + LINE_SEPARATOR).getBytes());            fos.write(("</head>" + LINE_SEPARATOR).getBytes());            fos.write(("<body>" + LINE_SEPARATOR).getBytes());            fos.write(("<H2>ndice de files</H2>" + LINE_SEPARATOR).getBytes());            fos.write(("<br>" + LINE_SEPARATOR).getBytes());            fos.write(("<br>" + LINE_SEPARATOR).getBytes());            fos.write(("<TABLE BORDER='1' CELLPADDING='3' CELLSPACING='0' WIDTH='100%'>" + LINE_SEPARATOR).getBytes());            fos.write(("<TR CLASS='TableHeadingColor'>" + LINE_SEPARATOR).getBytes());            fos.write(("<TD ALIGN='left'><FONT SIZE='+2' WIDTH='30%'>" + LINE_SEPARATOR).getBytes());            fos.write(("<B>Nome do file</B></FONT></TD>" + LINE_SEPARATOR).getBytes());            fos.write(("<TD ALIGN='left'><FONT SIZE='+2' WIDTH='70%'>" + LINE_SEPARATOR).getBytes());            fos.write(("<B>Resumo do contedo</B></FONT></TD>" + LINE_SEPARATOR).getBytes());            fos.write(("</TR>" + LINE_SEPARATOR).getBytes());            for (int i = 0; i < v.size(); i++) {                file = (File) v.get(i);                docGenerator = new GenerateHTMLDoc(jSDir, destDir, file.getName());            }            System.out.println("Nmero de files .js: " + v.size());            for (int i = 0; i < v.size(); i++) {                System.out.println(file.getName());                file = (File) v.get(i);                fos.write(("<TR>" + LINE_SEPARATOR).getBytes());                fos.write(("<TD WIDTH='30%' BGCOLOR='#f3f3f3'><font face='Verdana'><b><a href='" + file.getName().substring(0, file.getName().indexOf(".")) + ".htm" + "'>" + file.getName() + "</a></b></font></TD>" + LINE_SEPARATOR).getBytes());                fos.write(("<TD WIDTH='70%'>" + LINE_SEPARATOR).getBytes());                try {                    fis = new FileInputStream(jSDir + file.getName());                    br = new BufferedReader(new InputStreamReader(fis));                    while (br.ready()) {                        stringReader = br.readLine();                        if (null != stringReader && stringReader.indexOf("/**") != -1) {                            stringReader = br.readLine();                            while (null != stringReader && stringReader.indexOf("*/") == -1) {                                if (stringReader.indexOf("* @") != -1) {                                    if (stringReader.indexOf("summary") != -1) {                                        fos.write((stringReader.substring(stringReader.indexOf("* @summary") + 11) + LINE_SEPARATOR).getBytes());                                        fos.write("<BR>".getBytes());                                    }                                }                                stringReader = br.readLine();                            }                        }                    }                } catch (FileNotFoundException fnfe) {                    fnfe.printStackTrace();                }                fos.write(("</TD>" + LINE_SEPARATOR).getBytes());                fos.write(("</TR>" + LINE_SEPARATOR).getBytes());            }            fos.write(("</TABLE>" + LINE_SEPARATOR).getBytes());            fos.write("</body>".getBytes());            fos.write("</html>".getBytes());        } catch (IOException ioe) {            ioe.printStackTrace();        }    }