|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sakaiproject.util.FileItem
public class FileItem
FileItem is ...
| Field Summary | |
|---|---|
protected ByteArrayOutputStream |
m_body
Body stored in memory, filled in using this stream. |
protected byte[] |
m_bodyBytes
|
protected InputStream |
m_inputStream
Stream from which body can be read |
protected String |
m_name
file name. |
protected String |
m_type
file type. |
protected static int |
STREAM_BUFFER_SIZE
The chunk size used when streaming (100k). |
| Constructor Summary | |
|---|---|
FileItem(String fileName,
String fileType)
Construct |
|
FileItem(String fileName,
String fileType,
byte[] body)
|
|
FileItem(String fileName,
String fileType,
InputStream stream)
|
|
| Method Summary | |
|---|---|
byte[] |
get()
Access the body as a byte array. |
String |
getContentType()
|
String |
getFileName()
|
InputStream |
getInputStream()
Access the input stream from which the body can be read. |
String |
getString()
Access the body as a String. |
protected void |
stream2bodyBytes()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int STREAM_BUFFER_SIZE
protected ByteArrayOutputStream m_body
protected byte[] m_bodyBytes
protected String m_name
protected String m_type
protected InputStream m_inputStream
| Constructor Detail |
|---|
public FileItem(String fileName,
String fileType)
fileName - The file name.fileType - The file type.
public FileItem(String fileName,
String fileType,
byte[] body)
public FileItem(String fileName,
String fileType,
InputStream stream)
| Method Detail |
|---|
public String getFileName()
public String getContentType()
public String getString()
public byte[] get()
public InputStream getInputStream()
protected void stream2bodyBytes()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||