Package ninja.uploads
Interface FileItem
-
public interface FileItem
This interface represents a file or form item that was received within amultipart/form-data
POST request.- Author:
- Christian Bourgeois
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
cleanup()
Cleanup resources if needed.String
getContentType()
Returns the content type passed by the browser ornull
if not defined.File
getFile()
Returns anFile
that can be used to retrieve the contents of the file.String
getFileName()
Returns the original filename in the client's filesystem, as provided by the browser (or other client software).org.apache.commons.fileupload.FileItemHeaders
getHeaders()
Returns the file item headers.InputStream
getInputStream()
Returns anInputStream
that 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 anInputStream
that can be used to retrieve the contents of the file.
-
getContentType
String getContentType()
Returns the content type passed by the browser ornull
if not defined.
-
getHeaders
org.apache.commons.fileupload.FileItemHeaders getHeaders()
Returns the file item headers.
-
cleanup
void cleanup()
Cleanup resources if needed.
-
-