We use cookies to serve our customers and website visitors in the best possible way. Cookies are used for the proper functioning of the website and for improving the user experience, monitoring visitor traffic and marketing purposes. By continuing to browse the site, you agree to our use of cookies. You can read more about cookies here.
com.vaadin.flow.component.upload.
Package com.vaadin.flow.component.upload
Class ProgressUpdateEvent
java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<Upload>
com.vaadin.flow.component.upload.ProgressUpdateEvent
All Implemented Interfaces:
ProgressUpdateEvent is sent to track progress of upload.
Author:
Vaadin Ltd.
See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorsConstructorDescriptionProgressUpdateEvent
(Upload source, long readBytes, long contentLength) Event constructor method to construct a new progress event.
-
Method Summary
Modifier and TypeMethodDescriptionlong
Get total file size.
long
Get bytes transferred for this update.
Upload where the event occurred.
Methods inherited from class com.vaadin.flow.component.ComponentEvent
getSource, isFromClient, unregisterListener
Methods inherited from class java.util.EventObject
toString
-
Constructor Details
-
ProgressUpdateEvent
Event constructor method to construct a new progress event.
Parameters:
source
- the source of the filereadBytes
- bytes transferredcontentLength
- total size of file currently being uploaded, -1 if unknown
-
-
Method Details
-
getUpload
Upload where the event occurred.
Returns:
the Source of the event
-
getReadBytes
public long getReadBytes()Get bytes transferred for this update.
Returns:
bytes transferred
-
getContentLength
public long getContentLength()Get total file size.
Returns:
total file size or -1 if unknown
-