| java.lang.Object org.netbeans.lib.uihandler.MultiPartHandler
MultiPartHandler | public class MultiPartHandler (Code) | | |
Inner Class :public interface InputFacade | |
Inner Class :public interface RequestFacade | |
Constructor Summary | |
public | MultiPartHandler(RequestFacade request, String tmpDirectory) | public | MultiPartHandler(RequestFacade request, String tmpDirectory, int maxUploadSize) | public | MultiPartHandler(RequestFacade request, String tmpDirectory, int maxUploadSize, String fieldEncoding) Instantiate a new OneUpload to handle the given request,
saving any uploaded files to the given directory and limiting the
upload size to maxUploadSize. |
Method Summary | |
public void | close() | public File | getFile(String name) Returns a File object for the specified file saved on the server's
filesystem, or null if the file was not included in the upload. | public String | getFileName(String name) Returns the filesystem name of the specified file, or null if the
file was not included in the upload. | public Enumeration | getFileNames() Returns the names of all the uploaded files as an Enumeration of
Strings. | public String | getFileType(String name) Returns the content type of the specified file (as supplied by the
client browser), or null if the file was not included in the upload. | public String | getParameter(String name) Returns the value of the named parameter as a String, or null if
the parameter was not sent or was sent without a value. | public Enumeration | getParameterNames() Returns the names of all the parameters as an Enumeration of
Strings. | public String[] | getParameterValues(String name) Returns the values of the named parameter as a String array, or null if
the parameter was not sent. | public void | parseMultipartUpload() |
MultiPartHandler | public MultiPartHandler(RequestFacade request, String tmpDirectory) throws IOException(Code) | | Instantiate a new multipart handler with default
|
MultiPartHandler | public MultiPartHandler(RequestFacade request, String tmpDirectory, int maxUploadSize) throws IOException(Code) | | |
MultiPartHandler | public MultiPartHandler(RequestFacade request, String tmpDirectory, int maxUploadSize, String fieldEncoding) throws IOException(Code) | | Instantiate a new OneUpload to handle the given request,
saving any uploaded files to the given directory and limiting the
upload size to maxUploadSize.
An IOException is thrown when the request content-type doesn't match
with multipart/form-data or if the upload size exceeds the given limit.
call parseMultipartUpload() to parse various parts of the posted data and then
call getParameter(), getParameters(), getParameterNames() and getParameterValues()
functions to access form field names and their values.
call getFile(), getFileType() to access uploaded file and its content-type.
|
getFile | public File getFile(String name)(Code) | | Returns a File object for the specified file saved on the server's
filesystem, or null if the file was not included in the upload.
|
getFileName | public String getFileName(String name)(Code) | | Returns the filesystem name of the specified file, or null if the
file was not included in the upload. A filesystem name is the name
specified by the user. It is also the name under which the file is
actually saved.
|
getFileNames | public Enumeration getFileNames()(Code) | | Returns the names of all the uploaded files as an Enumeration of
Strings. It returns an empty Enumeration if there are no uploaded
files. Each file name is the name specified by the form, not by
the user.
|
getFileType | public String getFileType(String name)(Code) | | Returns the content type of the specified file (as supplied by the
client browser), or null if the file was not included in the upload.
|
getParameter | public String getParameter(String name)(Code) | | Returns the value of the named parameter as a String, or null if
the parameter was not sent or was sent without a value. The value
is guaranteed to be in its normal, decoded form. If the parameter
has multiple values, only the last one is returned (for backward
compatibility). For parameters with multiple values, it's possible
the last "value" may be null.
|
getParameterNames | public Enumeration getParameterNames()(Code) | | Returns the names of all the parameters as an Enumeration of
Strings. It returns an empty Enumeration if there are no parameters.
|
getParameterValues | public String[] getParameterValues(String name)(Code) | | Returns the values of the named parameter as a String array, or null if
the parameter was not sent. The array has one entry for each parameter
field sent. If any field was sent without a value that entry is stored
in the array as a null. The values are guaranteed to be in their
normal, decoded form. A single value is returned as a one-element array.
|
|
|