asia.redact.bracket.properties
Class OutputAdapter

java.lang.Object
  extended by asia.redact.bracket.properties.OutputAdapter

public class OutputAdapter
extends Object

 Output the properties to various data sinks and in various formats.
 
 

Author:
Dave

Field Summary
(package private) static String lineSeparator
           
(package private)  Properties properties
           
 
Constructor Summary
OutputAdapter(Properties properties)
           
 
Method Summary
private  void visit(Node node, int level, NodeVisitor func)
           
 void writeAsciiTo(File file)
          This is specifically intended for compatibility with java.util.Properties, which outputs in ISO-8859-1 (US-ASCII)
 void writeAsciiTo(File file, OutputFormat format)
          This is specifically intended for compatibility with java.util.Properties, which outputs in ISO-8859-1 (US-ASCII) Use AsciiOutputFormat to get unicode escapes or an output format with similar filtering.
 void writeAsXml(Writer out)
          The output from this method is designed to be read back in using Properties.Factory.getInstanceFromXML(File).
 void writeTo(File file)
           
 void writeTo(File file, OutputFormat format)
           
 void writeTo(File file, OutputFormat format, Charset charset)
          Use to control the format of the output.
 void writeTo(Writer writer)
           
 void writeTo(Writer writer, OutputFormat format)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

properties

final Properties properties

lineSeparator

static final String lineSeparator
Constructor Detail

OutputAdapter

public OutputAdapter(Properties properties)
Method Detail

writeTo

public void writeTo(File file)

writeTo

public void writeTo(File file,
                    OutputFormat format)

writeTo

public void writeTo(File file,
                    OutputFormat format,
                    Charset charset)
Use to control the format of the output. This is specifically intended for compatibility with java.util.Properties, which outputs in ISO-8859-1

Parameters:
file -
format -
charset -

writeAsciiTo

public void writeAsciiTo(File file,
                         OutputFormat format)
This is specifically intended for compatibility with java.util.Properties, which outputs in ISO-8859-1 (US-ASCII) Use AsciiOutputFormat to get unicode escapes or an output format with similar filtering.

Parameters:
file -
format -
charset -

writeAsciiTo

public void writeAsciiTo(File file)
This is specifically intended for compatibility with java.util.Properties, which outputs in ISO-8859-1 (US-ASCII)

Parameters:
file -
format -
charset -

writeTo

public void writeTo(Writer writer,
                    OutputFormat format)
             throws IOException
Throws:
IOException

writeTo

public void writeTo(Writer writer)
             throws IOException
Throws:
IOException

writeAsXml

public void writeAsXml(Writer out)
The output from this method is designed to be read back in using Properties.Factory.getInstanceFromXML(File).

Parameters:
out -

visit

private void visit(Node node,
                   int level,
                   NodeVisitor func)


Copyright © 2011-2013 David R. Smith. All Rights Reserved.