|
ICEfaces ACE Components 3.3.0 Java API Documentation |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FileEntryCallback
When files are being uploaded, they will be saved into the file-system unless a FileEntryCallback is provided, in which case the application may take responsibility for the process of saving the files. This is useful in cases where the files should be saved into a database, or processed in memory before being written to the file-system, etc. Each call to begin(-) can be followed by any number of calls to the write(-) methods, and then a call to end(-). Even if the begin(-) call shows that the file had pre-failed (say, due to an invalid file extension), end(-) will still be called, but not any of the write(-) methods.
Method Summary | |
---|---|
void |
begin(FileEntryResults.FileInfo fileInfo)
Notify the callback of another file that has been uploaded Check fileInfo.getStatus() to determine if the file has pre-failed uploading, due to too many files uploaded, an invalid file extension, or content type. |
void |
end(FileEntryResults.FileInfo fileInfo)
If we detect that a file failed, say because it's over quota, then we'll tell the callback, and it might massage the result, to still accept the file, or possibly to fail the file that we thought was ok, by calling FileEntryResults.FileInfo.updateStatus(FileEntryStatus, boolean). |
void |
write(byte[] buffer,
int offset,
int length)
We write in chunks, as we read them in |
void |
write(int data)
We write in chunks, as we read them in |
Method Detail |
---|
void begin(FileEntryResults.FileInfo fileInfo)
fileInfo
- Contains all of the information known about the file, before downloading the contentsvoid write(byte[] buffer, int offset, int length)
void write(int data)
void end(FileEntryResults.FileInfo fileInfo)
fileInfo
- The same object that was passed into begin(FileInfo)
|
ICEfaces ACE Components 3.3.0 Java API Documentation |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |