public class YamlGenerator
extends java.lang.Object
| Constructor and Description |
|---|
YamlGenerator() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
encapsulate(java.lang.String value)
Encapsulates a YAML value by enclosing it in quotes ("), if necessary.
|
static void |
encapsulate(java.lang.String value,
java.lang.Appendable writer)
Encapsulates a YAML value by enclosing it in quotes ("), if necessary, and appends the result to the writer.
|
static java.lang.String |
quote(java.lang.String value)
Encapsulates a YAML value by enclosing it in quotes (").
|
static void |
quote(java.lang.String value,
java.lang.Appendable writer)
Encapsulates a YAML value by enclosing it in quotes ("), and appends the result to the writer.
|
static java.lang.String |
serialize(java.lang.Iterable<? extends java.util.Map<java.lang.String,java.lang.String>> events)
Encodes the events as a list of YAML objects.
|
static void |
serialize(java.lang.Iterable<? extends java.util.Map<java.lang.String,java.lang.String>> events,
java.lang.Appendable writer)
Encodes the events as a list of YAML objects into the writer.
|
static java.lang.String |
serialize(java.util.Map<java.lang.String,java.lang.String> event)
Encodes the event as a YAML object.
|
static void |
serialize(java.util.Map<java.lang.String,java.lang.String> event,
java.lang.Appendable writer)
Encodes the event as a YAML object into the writer.
|
public static java.lang.String serialize(java.lang.Iterable<? extends java.util.Map<java.lang.String,java.lang.String>> events)
events - the eventspublic static void serialize(java.lang.Iterable<? extends java.util.Map<java.lang.String,java.lang.String>> events,
java.lang.Appendable writer)
throws java.io.IOException
events - the eventswriter - the writerjava.io.IOException - when appending to the writer produces an errorpublic static java.lang.String serialize(java.util.Map<java.lang.String,java.lang.String> event)
event - the eventpublic static void serialize(java.util.Map<java.lang.String,java.lang.String> event,
java.lang.Appendable writer)
throws java.io.IOException
event - the eventwriter - the writerjava.io.IOException - when appending to the writer produces an errorpublic static java.lang.String encapsulate(java.lang.String value)
value - the YAML value to encapsulatepublic static void encapsulate(java.lang.String value,
java.lang.Appendable writer)
throws java.io.IOException
value - the YAML value to encapsulatewriter - the writerjava.io.IOException - when appending to the writer produces an errorpublic static java.lang.String quote(java.lang.String value)
value - the YAML value to quotepublic static void quote(java.lang.String value,
java.lang.Appendable writer)
throws java.io.IOException
value - the YAML value to quotewriter - the writerjava.io.IOException - when appending to the writer produces an error