| java.lang.Object com.oreilly.servlet.multipart.Part com.oreilly.servlet.multipart.ParamPart
ParamPart | public class ParamPart extends Part (Code) | | A ParamPart is an upload part which represents a normal
INPUT (for example a non TYPE="file" ) form
parameter.
author: Geoff Soutter author: Jason Hunter version: 1.1, 2002/04/30, added better encoding support, thanks to version: Changshin Lee version: 1.0, 2000/10/27, initial revision |
Method Summary | |
public 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. | public 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. | public 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. | public boolean | isParam() Returns true to indicate this part is a parameter. |
ParamPart | ParamPart(String name, ServletInputStream in, String boundary, String encoding) throws IOException(Code) | | Constructs a parameter part; this is called by the parser.
Parameters: name - the name of the parameter. Parameters: in - the servlet input stream to read the parameter value from. Parameters: boundary - the MIME boundary that delimits the end of parameter value. Parameters: encoding - the byte-to-char encoding to use by defaultvalue. |
getStringValue | public String getStringValue() throws UnsupportedEncodingException(Code) | | 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.
value of parameter as a string. |
getStringValue | public String getStringValue(String encoding) throws UnsupportedEncodingException(Code) | | Returns the value of the parameter in the supplied encoding
or empty string if the user entered no value for this parameter.
value of parameter as a string. |
getValue | public byte[] getValue()(Code) | | 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.
value of parameter as raw bytes |
isParam | public boolean isParam()(Code) | | Returns true to indicate this part is a parameter.
true. |
|
|