|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.experlog.lite.MultipartRequest
public class MultipartRequest
Extracts parameter values from "multipart; form-data" contained in incoming HTTP servlet requests. For further details concerning multipart requests see RFC 1867.
Field Summary | |
---|---|
static java.lang.String |
fDoubleDash
Terminating sequence at end of multipart section |
static java.lang.String |
fEmptyLine
Sequence containing two end of line sequences in multipart data sections thus creating an empty line. |
static java.lang.String |
fEOLN
End of line sequence in multipart data sections |
Constructor Summary | |
---|---|
MultipartRequest(javax.servlet.http.HttpServletRequest request)
A convenience constructor allowing size of multipart content of incoming request to be of maximum size. |
|
MultipartRequest(javax.servlet.http.HttpServletRequest request,
int maxSize)
Creates new IncomingMultiPartHttpServlet out of |
Method Summary | |
---|---|
java.lang.String |
getBoundary()
Extracts boundary from ContentType. |
byte[] |
getByteContent()
Getter method to access #mDataBytes. |
int |
getContentLength()
Extracts ContentLength from #mRequest. |
java.lang.String |
getContentType()
Extracts ContentType from #mRequest. |
javax.servlet.ServletInputStream |
getDataInputStream()
Extracts DataInputStream from #mRequest. |
java.lang.String |
getFileContentType(java.lang.String name)
Extracts content-type from parameter block with the name specified if available. |
java.lang.String |
getFileName(java.lang.String name)
Extracts file name from parameter block with the name specified if available. |
byte[] |
getFileValue(java.lang.String name)
Extracts the binary content of parameter if available. |
java.lang.String |
getHeaderParameter(java.lang.String name)
To be consistent the name of this method should actually be getParameter. |
java.lang.String |
getMultipartHeader(java.lang.String name)
Returns a string containing value of the specified parameter, or null if parameter does not exist. |
java.lang.String |
getMultipartValue(java.lang.String name)
Returns a string containing value of the specified parameter, or null if parameter does not exist. |
java.lang.String |
getParameter(java.lang.String name)
To be consistent the name of this method should actually be getParameter. |
java.lang.String |
getQueryString()
Gets any query string that is part of the HTTP request URI (behind the '?'). |
java.lang.String |
getRemoteAddr()
Get IP address of calling client host from embedded HttpServletRequest. |
java.lang.String |
getRequestURL()
Retrieves URL used to contact server |
java.lang.String |
getScheme()
Retrieves scheme used to make request, such as ftp, http, https |
java.lang.String |
getServerName()
Retrieves name of server from incoming HttpServletRequest |
int |
getServerPort()
Retrieves port id of server from incoming HttpServletRequest |
java.lang.String |
getShortFileName(java.lang.String name)
Retrieves the file name contained in the DataBlock with the specified name stripped of any references to its path. |
boolean |
isSecure()
Determines whether request was made using a safe channel or not. |
static java.lang.String |
newString(byte[] bytes)
Creates a new String out of an array of bytes or out of null |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String fEOLN
public static final java.lang.String fEmptyLine
public static final java.lang.String fDoubleDash
Constructor Detail |
---|
public MultipartRequest(javax.servlet.http.HttpServletRequest request) throws javax.servlet.ServletException
request
- HttpServletRequest containing multipart message
javax.servlet.ServletException
- is thrown if thrown by this(request, -1);public MultipartRequest(javax.servlet.http.HttpServletRequest request, int maxSize) throws javax.servlet.ServletException
request
- HttpServletRequest containing multipart messagemaxSize
- max. allowable size of multipart message. If smaller than 0 it is assumed to
be Integer.MAX_VALUE
javax.servlet.ServletException
- is thrown if either of the following occurs:
MultipartRequest(HttpServletRequest, int)
Method Detail |
---|
public static final java.lang.String newString(byte[] bytes)
bytes
- an array of bytes or null
public javax.servlet.ServletInputStream getDataInputStream() throws java.io.IOException
java.io.IOException
public int getContentLength()
public java.lang.String getContentType()
public byte[] getByteContent()
public java.lang.String getBoundary()
public java.lang.String getQueryString()
public java.lang.String getRemoteAddr()
public java.lang.String getHeaderParameter(java.lang.String name)
name
- String containing name of requested parameter value
public java.lang.String getMultipartHeader(java.lang.String name)
name
- String containing the name of the requested parameter value.
public java.lang.String getMultipartValue(java.lang.String name)
name
- String containing the name of the requested parameter value.
public byte[] getFileValue(java.lang.String name)
name
- String containing name of parameter of which binary content is requested
public java.lang.String getFileContentType(java.lang.String name)
name
- String containing name of parameter of which content-type is requested
public java.lang.String getFileName(java.lang.String name)
name
- String containing name of parameter of which file name is requested
public java.lang.String getShortFileName(java.lang.String name)
name
- String containing name of data block of which file name is
requested.
public java.lang.String getParameter(java.lang.String name)
name
- String containing name of requested parameter value
getHeaderParameter(java.lang.String)
public java.lang.String getRequestURL()
public java.lang.String getScheme()
public boolean isSecure()
public java.lang.String getServerName()
public int getServerPort()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |