public void writeField(final String name,String value) throws java.io.IOException {
  if (name == null) {
    throw new IllegalArgumentException("Name cannot be null or empty.");
  }
  if (value == null) {
    value="";
  }
  out.writeBytes(PREFIX);
  out.writeBytes(boundary);
  out.writeBytes(NEWLINE);
  out.writeBytes("Content-Disposition: form-data; name=\"" + name + "\"");
  out.writeBytes(NEWLINE);
  out.writeBytes(NEWLINE);
  out.writeBytes(value);
  out.writeBytes(NEWLINE);
  out.flush();
}

public void writeField ( final String name , String value ) throws java . io . IOException { if ( name == null ) { throw new IllegalArgumentException ( "Name cannot be null or empty." ) ; } if ( value == null ) { value = "" ; } out . writeBytes ( PREFIX ) ; out . writeBytes ( boundary ) ; out . writeBytes ( NEWLINE ) ; out . writeBytes ( "Content-Disposition: form-data; name=\"" + name + "\"" ) ; out . writeBytes ( NEWLINE ) ; out . writeBytes ( NEWLINE ) ; out . writeBytes ( value ) ; out . writeBytes ( NEWLINE ) ; out . flush ( ) ; }
writes an string field value . if the value is null , an empty string is sent ( " " ) .
