byte[]
String
try { if (s != null) { return s.getBytes("UTF-8"); } else { return null; } } catch (UnsupportedEncodingException e) { throw new Error(e); }
try { if (b != null) { return new String(b, "UTF-8"); } else { return null; } } catch (UnsupportedEncodingException e) { throw new Error(e); }
try { if (utf8 != null) { return utf8.getBytes("UTF-8").length; } else { return 0; } } catch (UnsupportedEncodingException e) { throw new RuntimeException(); }