Package ninja.uploads
Interface FileItem
-
public interface FileItemThis interface represents a file or form item that was received within amultipart/form-dataPOST request.- Author:
- Christian Bourgeois
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcleanup()Cleanup resources if needed.StringgetContentType()Returns the content type passed by the browser ornullif not defined.FilegetFile()Returns anFilethat can be used to retrieve the contents of the file.StringgetFileName()Returns the original filename in the client's filesystem, as provided by the browser (or other client software).org.apache.commons.fileupload.FileItemHeadersgetHeaders()Returns the file item headers.InputStreamgetInputStream()Returns anInputStreamthat can be used to retrieve the contents of the file.
-
-
-
Method Detail
-
getFileName
String getFileName()
Returns the original filename in the client's filesystem, as provided by the browser (or other client software). In most cases, this will be the base file name, without path information. However, some clients, such as the Opera browser, do include path information.
-
getInputStream
InputStream getInputStream()
Returns anInputStreamthat can be used to retrieve the contents of the file.
-
getContentType
String getContentType()
Returns the content type passed by the browser ornullif not defined.
-
getHeaders
org.apache.commons.fileupload.FileItemHeaders getHeaders()
Returns the file item headers.
-
cleanup
void cleanup()
Cleanup resources if needed.
-
-