Construct a FormatOutput instance, tying the provided stream to a layout formatter.
Construct a FormatOutput instance, tying the provided stream to a layout formatter.
Control implicit flushing of newline(), where true enables flushing. An explicit flush() will always flush the output.
Layout using the provided formatting specification.
Layout using the provided formatting specification.
Unformatted layout, with commas inserted between args. Currently supports a maximum of 24 arguments.
Set the associated Layout.
Return the associated Layout.
Output a newline and optionally flush.
Return the associated output stream.
Set the associated output stream.
Return the hosting conduit.
Write to conduit from a source array. The provided src content will be written to the conduit.
Transfer the content of another conduit to this one. Returns a reference to this class, or throws IOException on failure.
Emit/purge buffered content.
Seek on this stream. Target conduits that don't support seeking will throw an IOException.
Return the upstream host of this filter.
Close the output.
A bridge between a Layout instance and a stream. This is used for the Stdout & Stderr globals, but can be used for general purpose buffer-formatting as desired. The Template type 'T' dictates the text arrangement within the target buffer ~ one of char, wchar or dchar (UTF8, UTF16, or UTF32).
FormatOutput exposes this style of usage:
Note that the last example does not throw an exception. There are several use-cases where dropping an argument is legitimate, so we're currently not enforcing any particular trap mechanism.
Flushing the output is achieved through the flush() method, or via an empty pair of parens:
Special character sequences, such as "\n", are written directly to the output without any translation (though an output-filter could be inserted to perform translation as required). Platform-specific newlines are generated instead via the newline() method, which also flushes the output when configured to do so:
The format() method supports the range of formatting options exposed by tango.text.convert.Layout and extensions thereof; including the full I18N extensions where configured in that manner. To create a French instance of FormatOutput:
Note that FormatOutput is *not* intended to be thread-safe.