|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.melati.servlet.MemoryFormDataAdaptor
public class MemoryFormDataAdaptor
Store the uploaded data in a byte array in memory.
Field Summary | |
---|---|
protected int |
BUFSIZE
Size for byte buffers |
Constructor Summary | |
---|---|
MemoryFormDataAdaptor()
|
Method Summary | |
---|---|
byte[] |
getData()
Return the data as a byte array. |
File |
getFile()
Return a File object pointing to the saved data (if one exists). |
long |
getSize()
Return the size of the data. |
String |
getURL()
Return a url to the object. |
void |
readData(MultipartFormField field,
DelimitedBufferedInputStream in,
byte[] delim)
Read data from in until the delim and save it in an internal buffer for later use. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int BUFSIZE
Constructor Detail |
---|
public MemoryFormDataAdaptor()
Method Detail |
---|
public byte[] getData()
getData
in interface FormDataAdaptor
public long getSize()
getSize
in interface FormDataAdaptor
public File getFile()
getFile
in interface FormDataAdaptor
null
public String getURL()
getURL
in interface FormDataAdaptor
public void readData(MultipartFormField field, DelimitedBufferedInputStream in, byte[] delim) throws IOException
readData
in interface FormDataAdaptor
field
- a MultipartFormField
to be readin
- a DelimitedBufferedInputStream
to read fromdelim
- the delimitor to differentiate elements
IOException
- if there is a problem reading the input
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |