This method will convert utf8 encoded bytes into a string. If an UnsupportedEncodingException occurs, this method will eat it and return null instead. @param bb Presumed UTF-8 encoded ByteBuffer. @return String made from b or null
(ByteBuffer bb)
| 293 | * @return String made from <code>b</code> or null |
| 294 | */ |
| 295 | public static String toString(ByteBuffer bb) { |
| 296 | return bb == null ? null : toString(bb.array(), |
| 297 | bb.arrayOffset() + bb.position(), bb.remaining()); |
| 298 | } |
| 299 | |
| 300 | /** |
| 301 | * @param b |