jp.terasoluna.fw.web.struts.actions
Class DownloadString

java.lang.Object
  extended by jp.terasoluna.fw.web.struts.actions.AbstractDownloadObject
      extended by jp.terasoluna.fw.web.struts.actions.DownloadString
All Implemented Interfaces:
java.io.Serializable

public class DownloadString
extends AbstractDownloadObject

Class in which download data is String.

See Also:
Serialized Form

Field Summary
private  org.apache.commons.logging.Log log
          Log class.
private static long serialVersionUID
          Serial versionUID.
protected  java.lang.String value
          Download contents.
 
Fields inherited from class jp.terasoluna.fw.web.struts.actions.AbstractDownloadObject
additionalHeaders, charset, contentType, DEFAULT_CHARSET, DEFAULT_CONTENT_TYPE, name, NO_DOWNLOAD_CONTENT_ERROR
 
Constructor Summary
DownloadString(java.lang.String name, java.lang.String value)
          Constructor.
 
Method Summary
protected  byte[] getContent()
          Fetches download contents as byte array.
 int getLengthOfData()
          Fetches download size.
protected  java.io.InputStream getStreamInternal()
          Fetches stream of download contents internally.
 
Methods inherited from class jp.terasoluna.fw.web.struts.actions.AbstractDownloadObject
addHeader, getAdditionalHeaders, getCharset, getContentType, getName, getStream, setCharset, setContentType, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial versionUID.

See Also:
Constant Field Values

log

private org.apache.commons.logging.Log log
Logclass.


value

protected java.lang.String value
Download contents.

Constructor Detail

DownloadString

public DownloadString(java.lang.String name,
                      java.lang.String value)
Constructor.

Parameters:
name - Download name.
value - Download contents.
Method Detail

getLengthOfData

public int getLengthOfData()
Fetches download size.

Specified by:
getLengthOfData in class AbstractDownloadObject
Returns:
Download size.

getContent

protected byte[] getContent()
Fetches download contents as byte array.

Returns:
Byte array.

getStreamInternal

protected java.io.InputStream getStreamInternal()
                                         throws java.io.IOException
Fetches stream of download contents internally.

Specified by:
getStreamInternal in class AbstractDownloadObject
Returns:
Stream.
Throws:
java.io.IOException