class JavaPropertiesResource extends ResourceFilter {

    @Override
    public void write(OutputStream outStream, LanguageBundle languageBundle,
            FilterOptions options) throws IOException, ResourceFilterException {

        List<ResourceString> resStrings = languageBundle.getSortedResourceStrings();
        BreakIterator brkItr = Utils.getWordBreakIterator(options);

        PrintWriter pw = new PrintWriter(new OutputStreamWriter(outStream, getCharset()));
        for (String note : languageBundle.getNotes()) {
            if (enc == Encoding.UTF_8) {
                // No needs to escape raw Unicode charters
                pw.println("#" + note);
            } else {
                // Needs to escape Unicode characters
                pw.println("#" + escapeOnlyUnicode(note));
            }
        }
        if (!languageBundle.getNotes().isEmpty()) {
            pw.println();
        }
        pw.println("#"+new Date().toString());
        for (ResourceString res : resStrings) {
            String value = res.getValue();  
            value = escapeMessagePattern(value, msgPatEsc);
            PropDef pd = new PropDef(res.getKey(),value,PropDef.PropSeparator.EQUAL,res.getNotes());
            pd.print(pw, brkItr, (enc == Encoding.UTF_8));
        }
        pw.close();
    }

    public  JavaPropertiesResource(Encoding enc, MessagePatternEscape msgPatEsc);
    public  JavaPropertiesResource();

}