public char[] toCharArray(){
  Charset utf8=Charset.forName("UTF-8");
  CharBuffer charBuffer=utf8.decode(ByteBuffer.wrap(buffer,offset,length));
  char[] chars=new char[charBuffer.remaining()];
  charBuffer.get(chars);
  return chars;
}

public char [ ] toCharArray ( ) { Charset utf8 = Charset . forName ( "UTF-8" ) ; CharBuffer charBuffer = utf8 . decode ( ByteBuffer . wrap ( buffer , offset , length ) ) ; char [ ] chars = new char [ charBuffer . remaining ( ) ] ; charBuffer . get ( chars ) ; return chars ; }
returns the utf - 8 decoded char array representation of this byte sequence .
