How to download a file from Hadoop

Hi,

My application has upload and download option. Im uploading the files to the Hadoop server. It is working fine. Now I need to download the same file. I have that particular file path, which loads the image when it is requested from the browser.

How can I download that file thru vaadin. Im using the below code. But it is not working.

public class FileDownloadResource extends FileResource {

public FileDownloadResource(File sourceFile, Application application) {
	super(sourceFile, application);
}

public DownloadStream getStream() {
	DownloadStream ds;
	try {
		ds = new DownloadStream(new FileInputStream(
			getSourceFile()), getMIMEType(), getFilename());
		ds.setParameter("Content-Disposition", "attachment; filename=\""+getFilename()+"\"");
		ds.setCacheTime(getCacheTime());
		return ds; 
	} catch (FileNotFoundException e1) {
		// TODO Auto-generated catch block
		e1.printStackTrace();
	}
	return null;
}

}

On Button Click

String path = “http://hadoop.domain.com/4/784071c8-76f4-478a-a56e-e0aeaa329f83.jpg?AWSAccessKeyId=1122959CAD6BF243F091&Expires=1320756536&Signature=0o10zCDDe35QCtDKJY7bOTMlgrg%3D”;
event.getButton().getWindow().open(new FileDownloadResource(new File(path), getApplication()));