// add the parameters if present
final FormUtility formData = new FormUtility(os, null);
for (final DocumentRange dr : form.getElements()) {
if (dr instanceof FormElement) {
final FormElement element = (FormElement) dr;
if ((element == submit) || element.isAutoSend()) {
final String name = element.getName();
String value = element.getValue();
if (name != null) {
if (value == null) {
value = "";
}
formData.add(name, value);