Interface StyledOutput
- All Superinterfaces:
AutoCloseable, Closeable
Class represents a consumer of styled text segments for the purposes of
exporting, copying, or saving to an output stream.
- Since:
- 24
-
Method Summary
Modifier and TypeMethodDescriptionvoidconsume(StyledSegment segment) Consumes the next styled segment.voidflush()Flushes this output stream.static StyledOutputCreates an instance of a plain text StyledOutput with the platform line ending.static StyledOutputforPlainText(LineEnding lineEnding) Creates an instance of a plain text StyledOutput with the specified line ending characters.
-
Method Details
-
consume
Consumes the next styled segment.- Parameters:
segment- the segment to output- Throws:
IOException- when an I/O error occurs
-
flush
Flushes this output stream.- Throws:
IOException- when an I/O error occurs
-
forPlainText
Creates an instance of a plain text StyledOutput with the platform line ending.- Returns:
- the instance of a plain text StyledOutput
-
forPlainText
Creates an instance of a plain text StyledOutput with the specified line ending characters.- Parameters:
lineEnding- the line ending characters- Returns:
- the instance of a plain text StyledOutput
- Since:
- 26
-