public static String readString(ByteBuffer buffer,int strLen){
  StringBuilder sb=new StringBuilder(strLen);
  for (int i=0; i < strLen; i++) {
    sb.append(buffer.getChar());
  }
  return sb.toString();
}

public static String readString ( ByteBuffer buffer , int strLen ) { StringBuilder sb = new StringBuilder ( strLen ) ; for ( int i = 0 ; i < strLen ; i ++ ) { sb . append ( buffer . getChar ( ) ) ; } return sb . toString ( ) ; }
read utf16 strings , use strlen , not ending 0 char .
