(byte[] b, int off, int len)
| 468 | } |
| 469 | |
| 470 | private static String utf8(byte[] b, int off, int len) { |
| 471 | try { |
| 472 | return new String(b, off, len, "UTF-8"); |
| 473 | } catch (java.io.UnsupportedEncodingException ex) { |
| 474 | // UTF-8 is required to be present on every JVM/CN1 runtime, so this |
| 475 | // never happens; rethrow rather than fall back to the platform default. |
| 476 | throw new RuntimeException(ex); |
| 477 | } |
| 478 | } |
| 479 | |
| 480 | private static byte[] utf8Bytes(String s) { |
| 481 | try { |