Package software.amazon.smithy.cli
Interface CliPrinter
- All Superinterfaces:
Flushable
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Handles text output of the CLI.
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
flush()
Flushes any buffers in the printer.static CliPrinter
fromOutputStream
(OutputStream stream) Create a new CliPrinter from an OutputStream.static CliPrinter
fromPrintWriter
(PrintWriter printWriter) Create a new CliPrinter from a PrintWriter.void
Prints text to the writer and appends a new line.
-
Method Details
-
println
Prints text to the writer and appends a new line.- Parameters:
text
- Text to print.
-
flush
default void flush()Flushes any buffers in the printer. -
fromPrintWriter
Create a new CliPrinter from a PrintWriter.- Parameters:
printWriter
- PrintWriter to write to.- Returns:
- Returns the created CliPrinter.
-
fromOutputStream
Create a new CliPrinter from an OutputStream.- Parameters:
stream
- OutputStream to write to.- Returns:
- Returns the created CliPrinter.
-