public class SimpleJsonSarWriter extends AbstractSarWriter
indent, nullRepresentation, stack
Constructor and Description |
---|
SimpleJsonSarWriter(OutputStream out)
See OutputStream.
|
Modifier and Type | Method and Description |
---|---|
String |
escape(char c)
Escape algorithm per character.
|
String |
wrapColumns(List<String> list)
Wrap columns.
|
String |
wrapInner(List<String> list)
Wrap children elements.
|
String |
wrapTables(String table,
List<String> list)
Wrap tables.
|
String |
writeColumn(String column,
String label,
String comment,
String value)
Output the column element.
|
String |
writeRoot(String inner)
Write root element.
|
String |
writeTable(String table,
String label,
String comment,
String props,
String inner)
Output the table element.
|
clear, close, escape, escapeJson, escapeXml, flush, id, indentBlock, init, pop, push, setIndentation, setNullRepresentation, toString, write
getEncoding, write, write, write
public SimpleJsonSarWriter(OutputStream out)
out
- OutputStreampublic String writeColumn(String column, String label, String comment, String value)
ISarWriter
column
- namelabel
- optional infocomment
- optional infovalue
- valuepublic String writeTable(String table, String label, String comment, String props, String inner)
ISarWriter
table
- namelabel
- optional infocomment
- optional infoprops
- columnsinner
- children datapublic String wrapTables(String table, List<String> list)
ISarWriter
wrapTables
in interface ISarWriter
wrapTables
in class AbstractSarWriter
table
- common table namelist
- rows for the tablepublic String wrapColumns(List<String> list)
ISarWriter
wrapColumns
in interface ISarWriter
wrapColumns
in class AbstractSarWriter
list
- as listpublic String wrapInner(List<String> list)
ISarWriter
wrapInner
in interface ISarWriter
wrapInner
in class AbstractSarWriter
list
- elementspublic String writeRoot(String inner)
ISarWriter
inner
- stringpublic String escape(char c)
ISarWriter
escape
in interface ISarWriter
escape
in class AbstractSarWriter
c
- charCopyright © 2021. All rights reserved.