The code is taken as an example from the off site of Vaadin:
class ImageUploader implements Receiver, SucceededListener { public File file; public OutputStream receiveUpload(String filename, String mimeType) { // Create and return a file output stream ... } public void uploadSucceeded(SucceededEvent event) { // Show the uploaded file in the image viewer image.setSource(new FileResource(file)); } };
The receiveUpload () function returns a stream of type OutputStream , do you need to close this stream? And How? After all, there is no explicit flow instance.