Class StringBuilderOutput

    • Constructor Detail

      • StringBuilderOutput

        public StringBuilderOutput​(ContentType contentType,
                                   java.lang.String charsetName)
      • StringBuilderOutput

        public StringBuilderOutput​(ContentType contentType,
                                   java.lang.String charsetName,
                                   int intialSize)
      • StringBuilderOutput

        public StringBuilderOutput​(ContentType contentType,
                                   java.nio.charset.Charset charset)
      • StringBuilderOutput

        public StringBuilderOutput​(ContentType contentType,
                                   java.nio.charset.Charset charset,
                                   int intialSize)
    • Method Detail

      • getBuffer

        public java.lang.StringBuilder getBuffer()
      • w

        public StringBuilderOutput w​(java.lang.String string)
                              throws java.io.IOException
        Description copied from interface: RockerOutput
        Writes a String to the output. Implementations are responsible for handling the conversion to the correct charset. Note that underlying implementations may be optimized to handle Strings vs. Bytes.
        Parameters:
        string - The string to write
        Returns:
        This output (so builder pattern can be used)
        Throws:
        java.io.IOException - Thrown on exception.
      • w

        public StringBuilderOutput w​(byte[] bytes)
                              throws java.io.IOException
        Throws:
        java.io.IOException