Class DummyFormatter

  • All Implemented Interfaces:
    OutputFormatter<java.lang.String>

    public class DummyFormatter
    extends java.lang.Object
    implements OutputFormatter<java.lang.String>
    A dummy instance to avoid NPEs.
    Author:
    Holger Eichelberger, SSE
    • Constructor Detail

      • DummyFormatter

        public DummyFormatter()
    • Method Detail

      • add

        public void add​(java.lang.String name,
                        java.lang.String data)
                 throws java.io.IOException
        Description copied from interface: OutputFormatter
        Adds information to one chunk of output. Hierarchical names separated by OutputFormatter.SEPARATOR can be used, but nested values for the same parent (object) field must be named in sequence.
        Specified by:
        add in interface OutputFormatter<java.lang.String>
        Parameters:
        name - optional data name field (may be null for none)
        data - the data to be added
        Throws:
        java.io.IOException - if adding the data fails for some reason
      • endStructure

        public void endStructure()
                          throws java.io.IOException
        Description copied from interface: OutputFormatter
        Ends a structure started before.
        Specified by:
        endStructure in interface OutputFormatter<java.lang.String>
        Throws:
        java.io.IOException - if ending the actual structure fails
      • chunkCompleted

        public byte[] chunkCompleted()
                              throws java.io.IOException
        Description copied from interface: OutputFormatter
        Completes a chunk of output data.
        Specified by:
        chunkCompleted in interface OutputFormatter<java.lang.String>
        Returns:
        the chunk
        Throws:
        java.io.IOException - if creating the chunk fails for some reason