/*
    public void makeCoverSheet(OutputStream out)         throws IOException {        wOut = new BufferedWriter(new OutputStreamWriter(out, "ISO8859-1"));                InputStream coverIS;        if (coverTemplate == null) {            // Try to find a locale specific cover page            final String prefix = "faxcover";            final String suffix = ".ps";            Locale loc = utils.getLocale();                        String[] tryList = {                    "_" + loc.getLanguage() + "_" + loc.getCountry() + "_" + loc.getVariant(),                    "_" + loc.getLanguage() + "_" + loc.getCountry(),                    "_" + loc.getLanguage(),                    ""            };            URL coverURL = null;            for (int i = 0; i < tryList.length; i++) {                coverURL = Faxcover.class.getResource(prefix + tryList[i] + suffix);                if (coverURL != null)                    break;            }            if (coverURL == null) {               throw new IOException("Default cover page not found!");            }            coverIS = coverURL.openStream();        } else            coverIS = new FileInputStream(coverTemplate);        BufferedReader rCover = new BufferedReader(new InputStreamReader(coverIS, "ISO8859-1"));                wOut.write("%!PS-Adobe-2.0 EPSF-2.0\n");        wOut.write("%%Creator: faxcover\n");        wOut.write("%%Title: HylaFAX Cover Sheet\n");        wOut.write("%%CreationDate: " + (new Date()).toString() + "\n");        wOut.write("%%Origin: 0 0\n");        wOut.write(String.format(Locale.US, "%%%%BoundingBox: 0 0 %.0f %.0f\n",        (pageWidth/25.4)*72, (pageLength/25.4)*72));        wOut.write("%%Pages: 1 +1\n");        wOut.write("%%EndComments\n");        wOut.write("%%BeginProlog\n");        wOut.write(String.format(Locale.US, "%d dict begin\n", maxcomments*2 + 80));        wOut.write(prologue);        emitToDefs(toName);        wOut.write(String.format(Locale.US, "/pageWidth %.2f def\n", pageWidth));        wOut.write(String.format(Locale.US, "/pageLength %.2f def\n", pageLength));        emitFromDefs();        coverDef("page-count", String.valueOf(pageCount));        emitDateDefs();        coverDef("regarding", regarding);        emitCommentDefs();        wOut.write(String.format(Locale.US, "/MaxComments %d def\n", maxcomments));        wOut.write("MaxComments comments BreakIntoCommentX\n");        wOut.write(String.format(Locale.US, "/MaxLenComments %d def\n", maxlencomments));        wOut.write("MaxComments comments BreakIntoCommentsX\n");        wOut.write("%%EndProlog\n");        wOut.write("%%Page: \"1\" 1\n");        // Copy prototype cover page:        char[] buf = new char[8191];        int cRead;        do {            cRead = rCover.read(buf);            if (cRead > 0)                wOut.write(buf, 0, cRead);        } while (cRead >= 0);        wOut.write("\nend\n");                rCover.close();        wOut.close();    }