private String readUTFBody(long utfLen) throws IOException {
  StringBuilder sbuf=new StringBuilder();
  end=pos=0;
  while (utfLen > 0) {
    int avail=end - pos;
    if (avail >= 3 || (long)avail == utfLen)     utfLen-=readUTFSpan(sbuf,utfLen);
 else {
      if (avail > 0)       GridUnsafe.copyMemory(utfBuf,BYTE_ARR_OFF + pos,utfBuf,BYTE_ARR_OFF,avail);
      pos=0;
      end=(int)Math.min(MAX_BLOCK_SIZE,utfLen);
      readFully(utfBuf,avail,end - avail);
    }
  }
  return sbuf.toString();
}

private String readUTFBody ( long utfLen ) throws IOException { StringBuilder sbuf = new StringBuilder ( ) ; end = pos = 0 ; while ( utfLen > 0 ) { int avail = end - pos ; if ( avail >= 3 || ( long ) avail == utfLen ) utfLen -= readUTFSpan ( sbuf , utfLen ) ; else { if ( avail > 0 ) GridUnsafe . copyMemory ( utfBuf , BYTE_ARR_OFF + pos , utfBuf , BYTE_ARR_OFF , avail ) ; pos = 0 ; end = ( int ) Math . min ( MAX_BLOCK_SIZE , utfLen ) ; readFully ( utfBuf , avail , end - avail ) ; } } return sbuf . toString ( ) ; }
reads in the " body " ( i . e . , the utf representation minus the 2 - byte or 8 - byte length header ) of a utf encoding , which occupies the next utflen bytes .
