Here you can find the source of getStringWOLength(ByteBuffer bb)
public static String getStringWOLength(ByteBuffer bb)
//package com.java2s; //License from project: LGPL import java.nio.ByteBuffer; import java.nio.charset.Charset; public class Main { public static String getStringWOLength(ByteBuffer bb) { byte[] b = new byte[bb.limit()]; bb.get(b);/* w w w .ja va 2 s .com*/ return new String(b, Charset.forName("UTF-8")); } }