- str
- the string to print to the target stream.
Prints a string followed by a newline. The string is converted to an array of bytes using the encoding chosen during the construction of this stream. The bytes are then written to the target stream with write(int).
If an I/O error occurs, this stream's error state is set to true.