com.oreilly.servlet.multipart
类 ParamPart

java.lang.Object
  继承者 com.oreilly.servlet.multipart.Part
      继承者 com.oreilly.servlet.multipart.ParamPart

public class ParamPart
extends Part

A ParamPart is an upload part which represents a normal INPUT (for example a non TYPE="file") form parameter.

版本:
1.1, 2002/04/30, added better encoding support, thanks to Changshin Lee, 1.0, 2000/10/27, initial revision
作者:
Geoff Soutter, Jason Hunter

方法摘要
 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.
 
从类 com.oreilly.servlet.multipart.Part 继承的方法
getName, isFile
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

方法详细信息

getValue

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.

返回:
value of parameter as raw bytes

getStringValue

public String getStringValue()
                      throws UnsupportedEncodingException
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.
抛出:
UnsupportedEncodingException

getStringValue

public String getStringValue(String encoding)
                      throws UnsupportedEncodingException
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.
抛出:
UnsupportedEncodingException

isParam

public boolean isParam()
Returns true to indicate this part is a parameter.

覆盖:
Part 中的 isParam
返回:
true.


Copyright © 2013. All Rights Reserved.