Class OutputStreamOutput

    • Field Detail

      • stream

        private final java.io.OutputStream stream
    • Constructor Detail

      • OutputStreamOutput

        public OutputStreamOutput​(ContentType contentType,
                                  java.io.OutputStream stream,
                                  java.lang.String charsetName)
      • OutputStreamOutput

        public OutputStreamOutput​(ContentType contentType,
                                  java.io.OutputStream stream,
                                  java.nio.charset.Charset charset)
    • Method Detail

      • getStream

        public java.io.OutputStream getStream()
      • w

        public OutputStreamOutput 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 OutputStreamOutput w​(byte[] bytes)
                             throws java.io.IOException
        Throws:
        java.io.IOException