Package org.silverpeas.web.upload
Class FileUploadListener
- java.lang.Object
-
- org.silverpeas.web.upload.FileUploadListener
-
- All Implemented Interfaces:
OutputStreamListener
public class FileUploadListener extends Object implements OutputStreamListener
Listener to listen to the status of a file upload.- Author:
- ehugonnet
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FileUploadListener.FileUploadStats
-
Constructor Summary
Constructors Constructor Description FileUploadListener(long totalSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
begin()
When the OutputStream is opened.void
end()
When the OutputStream is opened.void
error(String s)
In case of an exception.FileUploadListener.FileUploadStats
getFileUploadStats()
void
readBytes(int byteCount)
Called each time some bytes are written.
-
-
-
Method Detail
-
begin
public void begin()
Description copied from interface:OutputStreamListener
When the OutputStream is opened.- Specified by:
begin
in interfaceOutputStreamListener
-
readBytes
public void readBytes(int byteCount)
Description copied from interface:OutputStreamListener
Called each time some bytes are written.- Specified by:
readBytes
in interfaceOutputStreamListener
- Parameters:
byteCount
- : the number of bytes written.
-
error
public void error(String s)
Description copied from interface:OutputStreamListener
In case of an exception.- Specified by:
error
in interfaceOutputStreamListener
- Parameters:
s
- the error message.
-
end
public void end()
Description copied from interface:OutputStreamListener
When the OutputStream is opened.- Specified by:
end
in interfaceOutputStreamListener
-
getFileUploadStats
public FileUploadListener.FileUploadStats getFileUploadStats()
-
-