org.apertereports.util
Class FileStreamer

java.lang.Object
  extended by org.apertereports.util.FileStreamer

public class FileStreamer
extends Object

A utility class that handles opening of a new window with a report stream.


Constructor Summary
FileStreamer()
           
 
Method Summary
static void openFileInCurrentWindow(com.vaadin.Application application, String filename, byte[] reportContent, String mimeType)
          Starts download in current window with provided content.
static void openFileInNewWindow(com.vaadin.Application app, String fileName, byte[] fileContent, String mimeType)
          Opens a new download window with provided content.
static void showFile(com.vaadin.Application app, String reportName, byte[] report, String format)
          Opens a new download window with provided content.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileStreamer

public FileStreamer()
Method Detail

openFileInNewWindow

public static void openFileInNewWindow(com.vaadin.Application app,
                                       String fileName,
                                       byte[] fileContent,
                                       String mimeType)
Opens a new download window with provided content.

Parameters:
app - The application
fileName - The filename linked with the content
fileContent - The content
mimeType - The exact mime type of the content

showFile

public static void showFile(com.vaadin.Application app,
                            String reportName,
                            byte[] report,
                            String format)
Opens a new download window with provided content.

Parameters:
app - The application
reportName - The name of the report
report - The report content
format - The format of the report (i.e. PDF)

openFileInCurrentWindow

public static void openFileInCurrentWindow(com.vaadin.Application application,
                                           String filename,
                                           byte[] reportContent,
                                           String mimeType)
Starts download in current window with provided content.

Parameters:
app - The application
reportName - The name of the report
report - The report content
format - The format of the report (i.e. PDF)


Copyright © 2011-2012. All Rights Reserved.