Servlets.com

Home

What's New?

com.oreilly.servlet

Servlet Polls

Mailing Lists

List Archives

Servlet Engines

Servlet ISPs

Servlet Tools

Documentation

Online Articles

The Soapbox

"Java Servlet
Programming,
Second Edition"

"Java Enterprise
Best Practices"

Speaking & Slides

About Jason

XQuery Affiliate

Advertising Info

ParamPart

com.oreilly.servlet.multipart
Class 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.

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

Method Summary
 java.lang.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.
 java.lang.String getStringValue(java.lang.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.
 
Methods inherited from class com.oreilly.servlet.multipart.Part
getName, isFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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.

Returns:
value of parameter as raw bytes

getStringValue

public java.lang.String getStringValue()
                                throws java.io.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.

Returns:
value of parameter as a string.
java.io.UnsupportedEncodingException

getStringValue

public java.lang.String getStringValue(java.lang.String encoding)
                                throws java.io.UnsupportedEncodingException
Returns the value of the parameter in the supplied encoding or empty string if the user entered no value for this parameter.

Returns:
value of parameter as a string.
java.io.UnsupportedEncodingException

isParam

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

Overrides:
isParam in class Part
Returns:
true.

 


Home   com.oreilly.servlet   Polls   Lists   Archives
Engines   ISPs   Tools   Docs   Articles   Soapbox   Book

Copyright © 1999-2005 Jason Hunter
Privacy Policy

webmaster@servlets.com
Last updated: October 30, 2006