is there a good way to use vaadin to display pdf file in browser?

is there a good way to use vaadin to display pdf file in browser? are there example snippet?

I use this:

public void showFile(final byte[] report) {

	StreamResource r = new StreamResource(new StreamSource() {
		@Override
		public InputStream getStream() {
			return new ByteArrayInputStream(report);
		}
	}, "temp.pdf");
	r.setCacheTime(0);
	r.setMIMEType("application/pdf");

	BrowserFrame e = new BrowserFrame(null, r);
	e.setHeight("100%");
	e.setWidth("100%");

	Window win = new Window("report");
	win.setContent(e);
	win.center();
	win.setHeight("90%");
	win.setWidth("70%");
	win.addStyleName("reportpopup");
	getUI().addWindow(win);
}

Of course, you can build the stream from other sources, like a File.