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.ui.
Class Html5File
java.lang.Object
com.vaadin.ui.Html5File
All Implemented Interfaces:
- extends Object
- implements Serializable
public class Html5File
DragAndDropWrapper
can receive also files from client computer if
appropriate HTML 5 features are supported on client side. This class wraps
information about dragged file on server side.
See Also:
Method Summary | |
---|---|
String |
getFileName()
|
long |
getFileSize()
|
StreamVariable |
getStreamVariable()
|
String |
getType()
|
void |
setStreamVariable(StreamVariable streamVariable)
Sets the StreamVariable that into which the file contents will be
written. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
getFileName
public String getFileName()
getFileSize
public long getFileSize()
getType
public String getType()
setStreamVariable
public void setStreamVariable(StreamVariable streamVariable)
- Parameters:
streamVariable
- the callback that returns stream where the implementation writes the file contents as it arrives.
Sets the StreamVariable
that into which the file contents will be
written. Usage of StreamVariable is similar to Upload
component.
If the StreamVariable
is not set in the DropHandler
the
file contents will not be sent to server.
Note! receiving file contents is experimental feature depending on HTML 5 API's. It is supported only by modern web browsers like Firefox 3.6 and above and recent webkit based browsers (Safari 5, Chrome 6) at this time.
getStreamVariable
public StreamVariable getStreamVariable()