private void appendBuffer(StringBuilder buffer,String name,String value){
  if (buffer.length() > 0) {
    buffer.append('&');
  }
  String encodedName=URLEncoder.encode(name);
  buffer.append(encodedName);
  buffer.append('=');
  String encodedValue=URLEncoder.encode(value);
  buffer.append(encodedValue);
}

private void appendBuffer ( StringBuilder buffer , String name , String value ) { if ( buffer . length ( ) > 0 ) { buffer . append ( '&' ) ; } String encodedName = URLEncoder . encode ( name ) ; buffer . append ( encodedName ) ; buffer . append ( '=' ) ; String encodedValue = URLEncoder . encode ( value ) ; buffer . append ( encodedValue ) ; }
appends name / value pairs into the buffer . both names and values are encoded using the urlencoder . encode ( ) method before being added to the buffer .
