public BytePointer(String s,String charsetName) throws UnsupportedEncodingException {
  this(s.getBytes(charsetName).length + 1);
  putString(s,charsetName);
}

public BytePointer ( String s , String charsetName ) throws UnsupportedEncodingException { this ( s . getBytes ( charsetName ) . length + 1 ) ; putString ( s , charsetName ) ; }
allocates enough memory for the encoded string and actually encodes it in the named charset before copying it .
