Example usage for com.vaadin.server DownloadStream setBufferSize

List of usage examples for com.vaadin.server DownloadStream setBufferSize

Introduction

In this page you can find the example usage for com.vaadin.server DownloadStream setBufferSize.

Prototype

public void setBufferSize(int bufferSize) 

Source Link

Document

Sets the size of the download buffer.

Usage

From source file:org.lucidj.vaadinui.BundleResource.java

License:Apache License

@Override
public DownloadStream getStream() {
    try {//w  w w .  j ava2  s .com
        DownloadStream ds = new DownloadStream(resourceUrl.openStream(), getMIMEType(), getFilename());
        ds.setBufferSize(getBufferSize());
        ds.setCacheTime(getCacheTime());
        return (ds);
    } catch (IOException e) {
        throw new IllegalArgumentException(e);
    }
}