org.slim3.struts.util
Class ResponseUtil

java.lang.Object
  extended by org.slim3.struts.util.ResponseUtil

public final class ResponseUtil
extends Object

A utility for HttpServletResponse.

Since:
3.0
Author:
higa

Method Summary
static void download(String fileName, byte[] data)
          Downloads the data.
static void download(String fileName, InputStream in)
          Downloads the data.
static void download(String fileName, InputStream in, int length)
          Downloads the data.
static void write(String text)
          Writes the text to response.
static void write(String text, String contentType)
          Writes the text to response.
static void write(String text, String contentType, String encoding)
          Writes the text to response.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

download

public static void download(String fileName,
                            byte[] data)
Downloads the data.

Parameters:
fileName - the file name
data - the data

download

public static void download(String fileName,
                            InputStream in)
Downloads the data.

Parameters:
fileName - the file name
in - the input stream

download

public static void download(String fileName,
                            InputStream in,
                            int length)
Downloads the data.

Parameters:
fileName - the file name
in - the input stream
length - content length

write

public static void write(String text)
Writes the text to response.

Parameters:
text - the text

write

public static void write(String text,
                         String contentType)
Writes the text to response.

Parameters:
text - the text
contentType - the content type

write

public static void write(String text,
                         String contentType,
                         String encoding)
Writes the text to response.

Parameters:
text - the text
contentType - the content type
encoding - the encoding


Copyright © 2008-2009 The Slim3 project. All Rights Reserved.