/** * Creates a new {@link PropertiesTextWriter} that will write to the supplied * {@link Writer}. * * @param writer * The {@link Writer} to write the {@link Properties} document * to. */ public PropertiesTextWriter(final Writer writer) { this.os = new WriterOutputStream(writer, PropertiesFormat.TEXT.getCharset()); }
/** * Creates a new {@link PropertiesXMLWriter} that will write to the supplied * {@link Writer}. * * @param writer * The {@link Writer} to write the {@link Properties} document * to. */ public PropertiesXMLWriter(final Writer writer) { this.os = new WriterOutputStream(writer, PropertiesFormat.XML.getCharset()); }
/** * Creates a new {@link PropertiesXMLWriter} that will write to the supplied * {@link Writer}. * * @param writer * The {@link Writer} to write the {@link Properties} document * to. */ public PropertiesXMLWriter(final Writer writer) { this.os = new WriterOutputStream(writer, PropertiesFormat.XML.getCharset()); }
/** * Creates a new {@link PropertiesTextWriter} that will write to the supplied * {@link Writer}. * * @param writer * The {@link Writer} to write the {@link Properties} document * to. */ public PropertiesTextWriter(final Writer writer) { this.os = new WriterOutputStream(writer, PropertiesFormat.TEXT.getCharset()); }
@Override public Properties parse(final Reader reader) throws IOException { final InputStream in = new ReaderInputStream(reader, getFormat() .getCharset()); try { final Properties p = new Properties(); p.loadFromXML(in); return p; } finally { in.close(); } }
@Override public Properties parse(final Reader reader) throws IOException { final InputStream in = new ReaderInputStream(reader, getFormat() .getCharset()); try { final Properties p = new Properties(); p.loadFromXML(in); return p; } finally { in.close(); } }