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

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

public class DownloadByteArray
extends AbstractDownloadObject

Class in which download data is byte array.

See Also:
Serialized Form

Field Summary
protected  byte[] byteArray
           Download contents.
private static long serialVersionUID
          Serial version UID.
 
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
DownloadByteArray(java.lang.String name, byte[] byteArray)
          Constructor.
 
Method Summary
 int getLengthOfData()
          Fetches download size.
 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

byteArray

protected byte[] byteArray
Download contents.

Constructor Detail

DownloadByteArray

public DownloadByteArray(java.lang.String name,
                         byte[] byteArray)
Constructor.

Parameters:
name - Download name.
byteArray - Byte array which are the contents to be downloaded.
Method Detail

getLengthOfData

public int getLengthOfData()
Fetches download size.

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

getStreamInternal

public java.io.InputStream getStreamInternal()
                                      throws java.io.FileNotFoundException
Fetches the stream of download contents internally.

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