_cacheFileOut.println("<img alt=\"\" src='" + thisFile + "'>");
_cacheFileOut.println("<img alt=\"\" src='" + thisFile + "?v=@jsVersion@'>");
    private void copyImageFiles(String filenames[],                                String outputDirname,                                String suffix,                                boolean createInParentDir    )            throws IOException, ImageMergeException {        System.out.println("Copying " + suffix + " files...");        String lastFile = "";        for (String curFile : filenames) {            // copy it to the destination directory            // REVISIT: optimize this by passing in File objects...            File parentDir = new File(curFile).getParentFile();            String parentDirname = parentDir.getName();            // create output directory            // REVISIT: optimize this by creating the output dirs ahead of time...            File outputDir;            String outFilename = curFile.substring(curFile.lastIndexOf(File.separator) + 1);            String combinedFilename;            if (createInParentDir) {                outputDir = new File(outputDirname + File.separator + parentDirname);                combinedFilename = parentDirname + "/" + outFilename;            } else {                outputDir = new File(outputDirname);                combinedFilename = outFilename;            }            if (!outputDir.mkdirs() && !outputDir.exists()) {                throw new ImageMergeException("unable to create output directory");            }            // Skip decode for .ico files            if (!suffix.equalsIgnoreCase("ico")) {                // MOW: figure out if it's a stretchy image by the filename                int layoutStyle = getLayoutStyleFromFilename(curFile, suffix);                // load the image. GIF's get slightly special treatment.                DecodedImage curImage;                if (suffix.equalsIgnoreCase("gif")) {                    curImage = new DecodedGifImage(curFile,                            _cssPath, layoutStyle);                } else {                    curImage = new DecodedFullColorImage(                            curFile, suffix, _cssPath, layoutStyle);                }                String debugMsg = "Copying image " + curFile                        + (layoutStyle == ImageMerge.HORIZ_LAYOUT ? " as a horizontal border"                        : layoutStyle == ImageMerge.VERT_LAYOUT ? " as a vertical border"                        : layoutStyle == ImageMerge.TILE_LAYOUT ? " as a tiling background image"                        : "");                System.out.println(debugMsg);                curImage.load();                curImage.setCombinedColumn(0);                curImage.setCombinedRow(0);                // add to the CSS output                _cssOut.println(curImage.getCssString(curImage.getWidth(),                        curImage.getHeight(), combinedFilename, _incDisableCss));            }            copyFile(new File(curFile), new File(outputDir, outFilename));            // add to the pre-cache div            String thisFile = _cssPath + combinedFilename;            if (_cacheFileOut != null && !lastFile.equals(thisFile)) {                _cacheFileOut.println("<img alt=\"\" src='" + thisFile + "'>");                lastFile = thisFile;            }        }        System.out.println("Copied " + filenames.length + " " + suffix + " images.");    }