Class JsonWriter.Format
java.lang.Object
com.thoughtworks.xstream.io.json.JsonWriter.Format
- Enclosing class:
JsonWriter
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic intprivate char[]private final intprivate final NameCoderprivate char[]static int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchar[]Retrieve the lineIndenter.Retrieve the NameCoder.char[]Retrieve the newLine.intmode()Retrieve the mode flags of the formatter.
-
Field Details
-
SPACE_AFTER_LABEL
public static int SPACE_AFTER_LABEL -
COMPACT_EMPTY_ELEMENT
public static int COMPACT_EMPTY_ELEMENT -
lineIndenter
private char[] lineIndenter -
newLine
private char[] newLine -
mode
private final int mode -
nameCoder
-
-
Constructor Details
-
Format
public Format()Create a new default Formatter. The formatter uses two spaces, normal line feed character, adds a space after the label and will try to compact the output.- Since:
- 1.4.2
-
Format
public Format(char[] lineIndenter, char[] newLine, int mode) Create a new Formatter.- Parameters:
lineIndenter- the characters used for indenting the linenewLine- the characters used to create a new linemode- the flags for the format modes- Since:
- 1.4
-
Format
Create a new Formatter.- Parameters:
lineIndenter- the characters used for indenting the linenewLine- the characters used to create a new linemode- the flags for the format modesnameCoder- the name encoder and decoder- Since:
- 1.4.2
-
-
Method Details
-
getLineIndenter
public char[] getLineIndenter()Retrieve the lineIndenter.- Returns:
- the lineIndenter
- Since:
- 1.4
-
getNewLine
public char[] getNewLine()Retrieve the newLine.- Returns:
- the newLine
- Since:
- 1.4
-
mode
public int mode()Retrieve the mode flags of the formatter.- Returns:
- the mode
- Since:
- 1.4
-
getNameCoder
-