|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.groiss.servlet.MultipartRequest
public abstract class MultipartRequest
A wrapper of HttpServletRequest with additional methods to handle files and adding and removing parameters. Note that the createInstnace method must be called before any method of the original SerlvetRequest is called.
Field Summary |
---|
Fields inherited from interface javax.servlet.http.HttpServletRequest |
---|
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH |
Constructor Summary | |
---|---|
MultipartRequest()
|
Method Summary | |
---|---|
abstract void |
addParameter(java.lang.String name,
java.lang.String value)
Add a parameter to the parameter list. |
static MultipartRequest |
createInstance(javax.servlet.http.HttpServletRequest req)
Crete the MultipartRequest from the ServletRequest. |
abstract javax.servlet.http.Cookie |
getCookie(java.lang.String id)
Get cookie from id (don't iterate the array) |
abstract java.io.File |
getFile(java.lang.String name)
Return the locally stored temporary file associated with the parameter name given as argument. |
abstract java.util.Enumeration |
getFileNames()
Return the name of the parameters containing files as values. |
abstract java.util.Hashtable |
getFiles()
Deprecated. |
abstract java.lang.String |
getParamsAsLink()
This method builds a parameter string suitable for a GET request out of the parameter map. |
abstract java.lang.String |
getRemoteFileName(java.lang.String name)
Return the remote file name of the file associated with the parameter name given as argument. |
abstract void |
removeParameter(java.lang.String name)
Removes a parameter from the parameter list. |
abstract void |
setPathInfo(java.lang.String path)
Sets the path info. |
abstract void |
setQueryString(java.lang.String params,
boolean removeParams)
Sets the paramters from a query-string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.servlet.http.HttpServletRequest |
---|
getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole |
Methods inherited from interface javax.servlet.ServletRequest |
---|
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding |
Constructor Detail |
---|
public MultipartRequest()
Method Detail |
---|
public static MultipartRequest createInstance(javax.servlet.http.HttpServletRequest req)
req
- the original requestpublic abstract java.util.Enumeration getFileNames()
public abstract java.io.File getFile(java.lang.String name)
name
- the name of the parameterpublic abstract java.lang.String getRemoteFileName(java.lang.String name)
name
- the name of the parameterpublic abstract void addParameter(java.lang.String name, java.lang.String value)
name
- the name of the parametervalue
- the value of the parameterpublic abstract void removeParameter(java.lang.String name)
name
- the name of the parameterpublic abstract void setPathInfo(java.lang.String path)
path
- the new path infopublic abstract void setQueryString(java.lang.String params, boolean removeParams)
params
- the params in HTTP-GET syntax: param1=value1¶m2=value2removeParams
- if true for each parameter of the query string already existing values are removed.public abstract javax.servlet.http.Cookie getCookie(java.lang.String id)
public abstract java.lang.String getParamsAsLink() throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
@Deprecated public abstract java.util.Hashtable getFiles()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |