public class OutputFormat extends JsonHandler
Modifier and Type | Class and Description |
---|---|
static class |
OutputFormat.FIELDS |
static class |
OutputFormat.OUTPUTFORMAT |
mapper, typeReferenceMapStringObject
Constructor and Description |
---|
OutputFormat(String command,
String[] args)
Create an OutputFormat helper using the default Format defined in
defaultOutput
|
Modifier and Type | Method and Description |
---|---|
boolean |
exist(String... field) |
OutputFormat.OUTPUTFORMAT |
getFormat() |
static void |
getParams(String[] args)
Helper to set the output format desired for the command
|
static boolean |
isCsv() |
static boolean |
isJson() |
static boolean |
isProperty() |
static boolean |
isQuiet() |
static boolean |
isXml() |
String |
loggerOut()
Helper for Logger
|
static void |
setDefaultOutput(OutputFormat.OUTPUTFORMAT outputformat)
To set the default OutputFormat
|
void |
setFormat(OutputFormat.OUTPUTFORMAT format)
To change the applied format
|
void |
setValue(Map<String,Object> values) |
void |
setValue(String field,
boolean value) |
void |
setValue(String field,
byte[] value) |
void |
setValue(String field,
double value) |
void |
setValue(String field,
int value) |
void |
setValue(String field,
long value) |
void |
setValue(String field,
String value) |
void |
setValueString(Map<String,String> values) |
void |
setValueString(com.fasterxml.jackson.databind.node.ObjectNode node) |
void |
sysout()
Helper for sysOut
|
String |
toString() |
String |
toString(OutputFormat.OUTPUTFORMAT format)
Helper to get string representation of the current object
|
createArrayNode, createObjectNode, exist, exist, getFromFile, getFromFile, getFromString, getFromString, getFromStringExc, getMapFromString, getString, getString, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, prettyPrint, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, unEscape, writeAsFile, writeAsString, writeAsStringEscaped
public static void getParams(String[] args)
args
- public static void setDefaultOutput(OutputFormat.OUTPUTFORMAT outputformat)
outputformat
- public final void setFormat(OutputFormat.OUTPUTFORMAT format)
format
- public final OutputFormat.OUTPUTFORMAT getFormat()
public final void setValueString(com.fasterxml.jackson.databind.node.ObjectNode node)
node
- public final void setValue(String field, boolean value)
field
- value
- public final void setValue(String field, double value)
field
- value
- public final void setValue(String field, int value)
field
- value
- public final void setValue(String field, long value)
field
- value
- public final void setValue(String field, byte[] value)
field
- value
- public final boolean exist(String... field)
field
- public static boolean isQuiet()
public static boolean isXml()
public static boolean isCsv()
public static boolean isJson()
public static boolean isProperty()
public final void sysout()
public final String loggerOut()
public final String toString(OutputFormat.OUTPUTFORMAT format)
format
- Copyright © 2009–2022 Waarp. All rights reserved.