Class Emitter

java.lang.Object
org.yaml.snakeyaml.emitter.Emitter
All Implemented Interfaces:
Emitable

public final class Emitter extends Object implements Emitable
 Emitter expects events obeying the following grammar:
 stream ::= STREAM-START document* STREAM-END
 document ::= DOCUMENT-START node DOCUMENT-END
 node ::= SCALAR | sequence | mapping
 sequence ::= SEQUENCE-START node* SEQUENCE-END
 mapping ::= MAPPING-START (node node)* MAPPING-END
 
  • Field Details

    • MIN_INDENT

      public static final int MIN_INDENT
      indent cannot be zero spaces
      See Also:
    • MAX_INDENT

      public static final int MAX_INDENT
      indent should not be more than 10 spaces
      See Also:
  • Constructor Details

    • Emitter

      public Emitter(Writer stream, DumperOptions opts)
      Create
      Parameters:
      stream - - output to write to
      opts - - options
  • Method Details

    • emit

      public void emit(Event event) throws IOException
      Description copied from interface: Emitable
      Serialise event to bytes
      Specified by:
      emit in interface Emitable
      Parameters:
      event - - the source
      Throws:
      IOException - if bytes bite