com.sage.orion.sdata.servlet.accpac
Class BinaryResponse

java.lang.Object
  extended by com.sage.orion.sdata.servlet.accpac.BinaryResponse
All Implemented Interfaces:
ResourceResponse

public class BinaryResponse
extends java.lang.Object
implements ResourceResponse

this class is designed to return a binary HTTP response from the given InputStream

Author:
cliwa01

Constructor Summary
BinaryResponse(java.io.InputStream data, java.lang.String filename, long fileLength, java.lang.String mimetype)
          Constructor.
 
Method Summary
 void addToResponse(javax.servlet.http.HttpServletResponse response, java.lang.String resourcesURL, java.lang.String fullURL, SDataDiagnoses sdataDiagnoses)
           
 java.lang.String getCacheControl()
          Gets the caching control information to place in the response header for the "Cache-Control" (e.g.
 SDataResponseEntry getEntry()
          Gets the SDataResponseEntry.
 SDataResponseFeed getFeed()
          Gets the SDataResponseFeed.
 int getResponseCode()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinaryResponse

public BinaryResponse(java.io.InputStream data,
                      java.lang.String filename,
                      long fileLength,
                      java.lang.String mimetype)
Constructor.

Parameters:
data - the data to be sent to the client.
filename - the filename of the file to be sent to the client
fileLength - the length of the file to be sent to the client
mimetype - the mimetype of the document to be sent to the client. If null then the default mime type will be used.
Method Detail

addToResponse

public void addToResponse(javax.servlet.http.HttpServletResponse response,
                          java.lang.String resourcesURL,
                          java.lang.String fullURL,
                          SDataDiagnoses sdataDiagnoses)
Specified by:
addToResponse in interface ResourceResponse

getEntry

public SDataResponseEntry getEntry()
Description copied from interface: ResourceResponse
Gets the SDataResponseEntry.

Specified by:
getEntry in interface ResourceResponse

getFeed

public SDataResponseFeed getFeed()
Description copied from interface: ResourceResponse
Gets the SDataResponseFeed.

Specified by:
getFeed in interface ResourceResponse

getResponseCode

public int getResponseCode()
Specified by:
getResponseCode in interface ResourceResponse

getCacheControl

public java.lang.String getCacheControl()
Description copied from interface: ResourceResponse
Gets the caching control information to place in the response header for the "Cache-Control" (e.g. "no-cache" to specify not to have the browser cache this response)

Specified by:
getCacheControl in interface ResourceResponse
Returns:
the caching control information to place in the response header for the "Cache-Control" (e.g. "no-cache" to specify not to have the browser cache this response)


Copyright © 2011 Sage Software, Inc. All rights reserved.