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