Modifier and Type | Field and Description |
---|---|
private String |
encoding |
private byte[] |
value
contents of the parameter
|
Constructor and Description |
---|
ParamPart(String name,
ServletInputStream in,
String boundary,
String encoding)
Constructs a parameter part; this is called by the parser.
|
Modifier and Type | Method and Description |
---|---|
String |
getStringValue()
Returns the value of the parameter in as a string (using the
parser-specified encoding to convert from bytes) or the empty string
if the user entered no value for this parameter.
|
String |
getStringValue(String encoding)
Returns the value of the parameter in the supplied encoding
or empty string if the user entered no value for this parameter.
|
byte[] |
getValue()
Returns the value of the parameter as an array of bytes or a zero length
array if the user entered no value for this parameter.
|
boolean |
isParam()
Returns
true to indicate this part is a parameter. |
ParamPart(String name, ServletInputStream in, String boundary, String encoding) throws IOException
name
- the name of the parameter.in
- the servlet input stream to read the parameter value from.boundary
- the MIME boundary that delimits the end of parameter value.encoding
- the byte-to-char encoding to use by default
value.IOException
public byte[] getValue()
public String getStringValue() throws UnsupportedEncodingException
UnsupportedEncodingException
public String getStringValue(String encoding) throws UnsupportedEncodingException
UnsupportedEncodingException
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses