A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/io/PrintStream.html below:

PrintStream (Java SE 21 & JDK 21)

All Implemented Interfaces:
Closeable, Flushable, Appendable, AutoCloseable
Direct Known Subclasses:
LogStream

A

PrintStream

adds functionality to another output stream, namely the ability to print representations of various data values conveniently. Two other features are provided as well. Unlike other output streams, a

PrintStream

never throws an

IOException

; instead, exceptional situations merely set an internal flag that can be tested via the

checkError

method. Optionally, a

PrintStream

can be created so as to flush automatically; this means that the

flush

method of the underlying output stream is automatically invoked after a byte array is written, one of the

println

methods is invoked, or a newline character or byte (

'\n'

) is written.

All characters printed by a PrintStream are converted into bytes using the given encoding or charset, or the default charset if not specified. The PrintWriter class should be used in situations that require writing characters rather than bytes.

This class always replaces malformed and unmappable character sequences with the charset's default replacement string. The CharsetEncoder class should be used when more control over the encoding process is required.

Since:
1.0
See Also:

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4