br.gov.frameworkdemoiselle.internal.implementation
Class FileRendererImpl

java.lang.Object
  extended by br.gov.frameworkdemoiselle.internal.implementation.FileRendererImpl
All Implemented Interfaces:
FileRenderer, Serializable

public class FileRendererImpl
extends Object
implements FileRenderer

Responsible for displaying the contents of files in the browser.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface br.gov.frameworkdemoiselle.util.FileRenderer
FileRenderer.ContentType
 
Constructor Summary
FileRendererImpl()
           
 
Method Summary
 void render(byte[] byteArray, FileRenderer.ContentType contentType, String fileName)
          Renders a byteArray for display to the user.
 void render(byte[] byteArray, FileRenderer.ContentType contentType, String fileName, boolean forceDownload)
          Renders a byteArray for display to the user.
 void render(File file, FileRenderer.ContentType contentType, String fileName)
          Renders a file for display to the user.
 void render(File file, FileRenderer.ContentType contentType, String fileName, boolean forceDownload)
          Renders a file for display to the user.
 void render(InputStream stream, FileRenderer.ContentType contentType, String fileName)
          Renders an inputStream for display to the user.
 void render(InputStream stream, FileRenderer.ContentType contentType, String fileName, boolean forceDownload)
          Renders an inputStream for display to the user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileRendererImpl

public FileRendererImpl()
Method Detail

render

public void render(byte[] byteArray,
                   FileRenderer.ContentType contentType,
                   String fileName,
                   boolean forceDownload)
Description copied from interface: FileRenderer
Renders a byteArray for display to the user.

Specified by:
render in interface FileRenderer
Parameters:
byteArray - Byte Array to be rendered.
forceDownload - If true, will force a download from the browser, otherwise the browser is free to determine what will happen with the rendered content.

render

public void render(byte[] byteArray,
                   FileRenderer.ContentType contentType,
                   String fileName)
Description copied from interface: FileRenderer
Renders a byteArray for display to the user.

Specified by:
render in interface FileRenderer
Parameters:
byteArray - Byte Array to be rendered.

render

public void render(InputStream stream,
                   FileRenderer.ContentType contentType,
                   String fileName,
                   boolean forceDownload)
Description copied from interface: FileRenderer
Renders an inputStream for display to the user.

Specified by:
render in interface FileRenderer
forceDownload - If true, will force a download from the browser, otherwise the browser is free to determine what will happen with the rendered content.

render

public void render(InputStream stream,
                   FileRenderer.ContentType contentType,
                   String fileName)
Description copied from interface: FileRenderer
Renders an inputStream for display to the user.

Specified by:
render in interface FileRenderer

render

public void render(File file,
                   FileRenderer.ContentType contentType,
                   String fileName,
                   boolean forceDownload)
Description copied from interface: FileRenderer
Renders a file for display to the user.

Specified by:
render in interface FileRenderer
forceDownload - If true, will force a download from the browser, otherwise the browser is free to determine what will happen with the rendered content.

render

public void render(File file,
                   FileRenderer.ContentType contentType,
                   String fileName)
Description copied from interface: FileRenderer
Renders a file for display to the user.

Specified by:
render in interface FileRenderer


Copyright © 2012 SERPRO - Serviço Federal de Processamento de Dados. All Rights Reserved.