1 package net.matuschek.html; 2 3 6 7 import java.net.URLEncoder ; 8 9 16 public class FormField { 17 18 public String getFieldname() { 19 return fieldname; 20 } 21 22 public void setFieldname(String fieldname) { 23 this.fieldname = fieldname; 24 } 25 26 public String getValue() { 27 return value; 28 } 29 30 public void setValue(String value) { 31 this.value = value; 32 } 33 34 38 public String toString() { 39 return fieldname+"="+value; 40 } 41 42 43 48 @SuppressWarnings ("deprecation") 49 public String toEncodedString() { 50 return 51 URLEncoder.encode(fieldname)+ 52 "="+ 53 URLEncoder.encode(value); 54 } 55 56 private String fieldname; 57 58 private String value; 59 } 60 | Popular Tags |