|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface RequestParameter
The RequestParameter class represents a single parameter sent
with the client request. Instances of this class are returned by the
SlingHttpServletRequest.getRequestParameter(String),
SlingHttpServletRequest.getRequestParameters(String) and
SlingHttpServletRequest.getRequestParameterMap() method.
SlingHttpServletRequest.getRequestParameter(String),
SlingHttpServletRequest.getRequestParameters(String),
SlingHttpServletRequest.getRequestParameterMap()| Method Summary | |
|---|---|
byte[] |
get()
Returns the contents of the parameter as an array of bytes. |
String |
getContentType()
Returns the content type passed by the browser or null if
not defined. |
String |
getFileName()
Returns the original filename in the client's filesystem, as provided by the browser (or other client software). |
InputStream |
getInputStream()
Returns an InputStream that can be used to retrieve the contents of the file. |
long |
getSize()
Returns the size in bytes of the parameter. |
String |
getString()
Returns the contents of the parameter as a String, using the default character encoding. |
String |
getString(String encoding)
Returns the contents of the parameter as a String, using the specified encoding. |
boolean |
isFormField()
Determines whether or not this instance represents a simple form field or an uploaded file. |
| Method Detail |
|---|
boolean isFormField()
true if the instance represents a simple form
field; false if it represents an uploaded file.String getContentType()
null if
not defined.
null if
not defined.long getSize()
byte[] get()
InputStream getInputStream()
throws IOException
IOException - if an error occurs.String getFileName()
String getString()
get() to retrieve the
contents of the item.
String getString(String encoding)
throws UnsupportedEncodingException
get() to retrieve the contents
of the item.
encoding - The character encoding to use.
UnsupportedEncodingException - if the requested character encoding
is not available.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||