Methods Summary |
---|
protected void | addError(java.lang.String anErrorMessage)Adds an error message.
if (errors == null) {
errors = new ArrayList<String>();
}
errors.add(anErrorMessage);
|
public java.lang.String[] | getContentTypes(java.lang.String name)Get an array of content encoding for the specified input field name or null if
no content type was specified.
if (multi == null) {
return null;
}
return multi.getContentType(name);
|
public java.util.Collection | getErrors()Returns a collection of any errors generated when parsing the multipart request.
return errors;
|
public java.lang.String[] | getFileNames(java.lang.String fieldName)Get a String array of the file names for uploaded files
if (multi == null) {
return null;
}
return multi.getFileNames(fieldName);
|
public java.util.Enumeration | getFileParameterNames()Get an enumeration of the parameter names for uploaded files
if (multi == null) {
return null;
}
return multi.getFileParameterNames();
|
public java.lang.String[] | getFileSystemNames(java.lang.String fieldName)Get the filename(s) of the file(s) uploaded for the given input field name.
Returns null if the file is not found.
if (multi == null) {
return null;
}
return multi.getFilesystemName(fieldName);
|
public java.io.File[] | getFiles(java.lang.String fieldName)Get a {@link java.io.File[]} for the given input field name.
if (multi == null) {
return null;
}
return multi.getFile(fieldName);
|
public java.lang.String | getParameter(java.lang.String name)
return ((multi == null) || (multi.getParameter(name) == null)) ? super.getParameter(name) : multi.getParameter(name);
|
public java.util.Map | getParameterMap()
Map<String, String[]> map = new HashMap<String, String[]>();
Enumeration enumeration = getParameterNames();
while (enumeration.hasMoreElements()) {
String name = (String) enumeration.nextElement();
map.put(name, this.getParameterValues(name));
}
return map;
|
public java.util.Enumeration | getParameterNames()
if (multi == null) {
return super.getParameterNames();
} else {
return mergeParams(multi.getParameterNames(), super.getParameterNames());
}
|
public java.lang.String[] | getParameterValues(java.lang.String name)
return ((multi == null) || (multi.getParameterValues(name) == null)) ? super.getParameterValues(name) : multi.getParameterValues(name);
|
public boolean | hasErrors()Returns true if any errors occured when parsing the HTTP multipart request, false otherwise.
return !((errors == null) || errors.isEmpty());
|
protected java.util.Enumeration | mergeParams(java.util.Enumeration params1, java.util.Enumeration params2)Merges 2 enumeration of parameters as one.
Vector temp = new Vector();
while (params1.hasMoreElements()) {
temp.add(params1.nextElement());
}
while (params2.hasMoreElements()) {
temp.add(params2.nextElement());
}
return temp.elements();
|