org.itsnat.comp.iframe
Interface FileUploadRequest


public interface FileUploadRequest

The default implementation of this interface parses the headers of a file upload request and exposes the file being uploaded as an input stream.

Author:
Jose Maria Arranz Santamaria
See Also:
HTMLIFrameFileUpload.processFileUploadRequest(ItsNatServletRequest request, ItsNatServletResponse response)

Method Summary
 java.lang.String getContentType()
          Returns the content type of the file being uploaded as specified by browser.
 java.lang.String getFieldName()
          Returns the value of the name attribute specified in the <input type=file> element which was used for file uploading.
 java.lang.String getFileName()
          Returns the file name as it was specified by end user in the <input type=file> element which was used for file uploading.
 long getFileSize()
          Returns the file size of the file being uploaded.
 java.io.InputStream getFileUploadInputStream()
          Returns a stream of the file being uploaded.
 

Method Detail

getFieldName

java.lang.String getFieldName()
Returns the value of the name attribute specified in the <input type=file> element which was used for file uploading.

If no name attribute is specified in the original <input type=file> element ItsNat provides a temporary one.

Returns:
the value of the name attribute.

getFileName

java.lang.String getFileName()
Returns the file name as it was specified by end user in the <input type=file> element which was used for file uploading.

Returns:
the file name.

getContentType

java.lang.String getContentType()
Returns the content type of the file being uploaded as specified by browser.

Returns:
the content type of the file.

getFileSize

long getFileSize()
Returns the file size of the file being uploaded.

Returns:
the file size.

getFileUploadInputStream

java.io.InputStream getFileUploadInputStream()
Returns a stream of the file being uploaded.

The size of this stream must be the same as the value returned by getFileSize(), and content is the same as the original file in client.

Returns:
a stream of the file.


Copyright © 2007 Innowhere Software Services S.L. All Rights Reserved.