public void copyReader(String encoding,Reader r) throws IOException {
  super.setContentEncoding(encoding);
  String s=readString(r);
  content=s.getBytes(encoding);
}

public void copyReader ( String encoding , Reader r ) throws IOException { super . setContentEncoding ( encoding ) ; String s = readString ( r ) ; content = s . getBytes ( encoding ) ; }
set the content by copying characters from the given reader and converting them into bytes using the specified encoding .
