public void addString(String s,String encoding){
  if (encoding == null || encoding.equals("ISO-8859-1")) {
    addString(s);
    return;
  }
  byte[] bytes=null;
  try {
    bytes=s.getBytes(encoding);
  }
 catch (  UnsupportedEncodingException e) {
    addString(s);
    return;
  }
  int len=bytes.length;
  if (len + _length > _capacity)   ensureCapacity(_length + len);
  for (int i=0; i < len; i++)   _buffer[_length++]=bytes[i];
}

public void addString ( String s , String encoding ) { if ( encoding == null || encoding . equals ( "ISO-8859-1" ) ) { addString ( s ) ; return ; } byte [ ] bytes = null ; try { bytes = s . getBytes ( encoding ) ; } catch ( UnsupportedEncodingException e ) { addString ( s ) ; return ; } int len = bytes . length ; if ( len + _length > _capacity ) ensureCapacity ( _length + len ) ; for ( int i = 0 ; i < len ; i ++ ) _buffer [ _length ++ ] = bytes [ i ] ; }
adds a string with a specified encoding .
