Overriden so it uses UTF-8 when converting a string to byte[] @param s the string to be printed
(String s)
| 525 | * the string to be printed |
| 526 | */ |
| 527 | @Override |
| 528 | public void print(String s) { |
| 529 | try { |
| 530 | write((s == null ? "null" : s).getBytes("UTF-8")); |
| 531 | } catch(UnsupportedEncodingException uee) { |
| 532 | // support for UTF-8 is guaranteed by the JVM specification |
| 533 | } catch(IOException ioe) { |
| 534 | // print streams don't throw exceptions |
| 535 | setError(); |
| 536 | } |
| 537 | } |
| 538 | |
| 539 | /** |
| 540 | * Overriden so it uses UTF-8 when converting a char[] to byte[] |