Package org.sakaiproject.util
Class FileItem
- java.lang.Object
-
- org.sakaiproject.util.FileItem
-
public class FileItem extends Object
FileItem is a file uploaded by the end user's browser.
-
-
Field Summary
Fields Modifier and Type Field Description protected InputStreamm_inputStreamStream from which body can be readprotected Stringm_namefile name.protected Stringm_typefile type.protected static intSTREAM_BUFFER_SIZEThe chunk size used when streaming (100k).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetContentType()StringgetFileName()InputStreamgetInputStream()
-
-
-
Field Detail
-
STREAM_BUFFER_SIZE
protected static final int STREAM_BUFFER_SIZE
The chunk size used when streaming (100k).- See Also:
- Constant Field Values
-
m_name
protected String m_name
file name.
-
m_type
protected String m_type
file type.
-
m_inputStream
protected InputStream m_inputStream
Stream from which body can be read
-
-
Constructor Detail
-
FileItem
public FileItem(String fileName, String fileType)
Construct- Parameters:
fileName- The file name.fileType- The file type.
-
FileItem
public FileItem(String fileName, String fileType, InputStream stream)
-
-
Method Detail
-
getFileName
public String getFileName()
-
getContentType
public String getContentType()
-
getInputStream
public InputStream getInputStream()
- Returns:
- the input stream from which the body can be read.
-
-