Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cayenne.util
Class XMLEncoder

    java.lang.Object
      org.apache.cayenne.util.XMLEncoder

    public class XMLEncoder

extends java.lang.Object

A helper class to encode objects to XML.

Since:
  1.1
Author:
  Andrei Adamchik

Field Summary
`protected java.lang.String` | `indent`
`protected boolean` | `indentLine`
`protected int` | `indentTimes`
`protected java.io.PrintWriter` | `out`

Constructor Summary
`XMLEncoder(java.io.PrintWriter out)`
`XMLEncoder(java.io.PrintWriter out, java.lang.String indent)`

Method Summary
`java.io.PrintWriter` | `getPrintWriter()`
`void` | `indent(int i)`
`void` | `print(boolean b)`
`void` | `print(char c)`
`void` | `print(java.util.Collection c)` Utility method that prints all map values, assuming they are XMLSerializable objects.
`void` | `print(int i)`
`void` | `print(java.util.Map map)` Utility method that prints all map values, assuming they are XMLSerializable objects.
`void` | `print(java.lang.String text)`
`void` | `println(char c)`
`void` | `println(java.lang.String text)`
`void` | `printProperty(java.lang.String name, boolean b)` Prints a common XML element - property with name and value.
`void` | `printProperty(java.lang.String name, int i)` Prints a common XML element - property with name and value.
`void` | `printProperty(java.lang.String name, java.lang.String value)` Prints a common XML element - property with name and value.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### indent

    protected java.lang.String indent

### out

    protected java.io.PrintWriter out

### indentLine

    protected boolean indentLine

### indentTimes

    protected int indentTimes

Constructor Detail

### XMLEncoder

    public XMLEncoder(java.io.PrintWriter out)

### XMLEncoder

    public XMLEncoder(java.io.PrintWriter out,
                      java.lang.String indent)

Method Detail

### getPrintWriter

    public java.io.PrintWriter getPrintWriter()

### indent

    public void indent(int i)

### print

    public void print(java.util.Map map)

  Utility method that prints all map values, assuming they are XMLSerializable objects.

### print

    public void print(java.util.Collection c)

  Utility method that prints all map values, assuming they are XMLSerializable objects.

### printProperty

    public void printProperty(java.lang.String name,
                              java.lang.String value)

  Prints a common XML element - property with name and value.

### printProperty

    public void printProperty(java.lang.String name,
                              boolean b)

  Prints a common XML element - property with name and value.

### printProperty

    public void printProperty(java.lang.String name,
                              int i)

  Prints a common XML element - property with name and value.

### print

    public void print(java.lang.String text)

### print

    public void print(char c)

### print

    public void print(boolean b)

### print

    public void print(int i)

### println

    public void println(java.lang.String text)

### println

    public void println(char c)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2006 Apache.org All Rights Reserved.