com.businessobjects.dsws.reportengine
Interface BinaryView

All Superinterfaces:
View

public interface BinaryView
extends View

BinaryView is a interface used to obtain document output in binary format.
If you are retrieving binary output for a document that is large (for example, greater than 1 megabyte), you can use the BinaryView interface to obtain binary document output in blocks (or chunks). The setChunkSize method is used to specify the size of the chunks of data in kilobytes.

Example:Retrieve a document's contents in binary PDF format

 ViewSupport pdfViewSupport = ViewSupport.Factory.newInstance();
 pdfViewSupport.setOutputFormat(OutputFormatType.PDF);
 pdfViewSupport.setViewType(ViewType.BINARY);
 pdfViewSupport.setViewMode(ViewModeType.DOCUMENT);
 RetrieveBinaryView retBinView = RetrieveBinaryView.Factory.newInstance();
 retBinView.setViewSupport(pdfViewSupport);
 RetrieveData retBOData = RetrieveData.Factory.newInstance();
 retBOData.setRetrieveView(retBinView);

 DocumentInformation docInfo = boRepEng.getDocumentInformation(strDocid,null,null,null,retBOData);
 BinaryView myBinView = (BinaryView) docInfo.getView();
 OutputStream outputStream = response.getOutputStream();
 response.setContentType("application/pdf");
 response.setHeader("Content-Type","application/pdf");
 response.setDateHeader("expires", 0);
 byte[] abyBinaryContent = myBinView.getContent();
 outputStream.write(abyBinaryContent);
 

See Also:
ReportEngine, BinaryView, CharacterView, XMLView, ViewSupport, ViewModeType, RetrieveData, RetrieveView, OutputFormatType, DocumentInformation

Nested Class Summary
static class BinaryView.Factory
          A class with methods for creating instances of the BinaryView type.
 
Field Summary
static org.apache.xmlbeans.SchemaType type
          Internal Use Only.
 
Method Summary
 byte[] getContent()
          Returns the document in a binary stream.
 java.lang.String getMimeType()
          Returns the mime type of the document.
 boolean isSetContent()
          Checks if the Content element is set.
 boolean isSetMimeType()
          Checks if the MimeType attribute is set.
 void setContent(byte[] content)
          Internal Use Only.
 void setMimeType(java.lang.String mimeType)
          Internal Use Only.
 void unsetContent()
          Internal Use Only.
 void unsetMimeType()
          Internal Use Only.
 org.apache.xmlbeans.XmlBase64Binary xgetContent()
          Internal Use Only.
 org.apache.xmlbeans.XmlString xgetMimeType()
          Internal Use Only.
 void xsetContent(org.apache.xmlbeans.XmlBase64Binary content)
          Internal Use Only.
 void xsetMimeType(org.apache.xmlbeans.XmlString mimeType)
          Internal Use Only.
 
Methods inherited from interface com.businessobjects.dsws.reportengine.View
addNewReportPart, addNewViewSupport, getChunkSize, getContentLength, getLastChunk, getReportPartArray, getReportPartArray, getViewSupport, insertNewReportPart, isNilReportPartArray, isNilViewSupport, isSetChunkSize, isSetContentLength, isSetLastChunk, isSetViewSupport, removeReportPart, setChunkSize, setContentLength, setLastChunk, setNilReportPartArray, setNilViewSupport, setReportPartArray, setReportPartArray, setViewSupport, sizeOfReportPartArray, unsetChunkSize, unsetContentLength, unsetLastChunk, unsetViewSupport, xgetChunkSize, xgetContentLength, xgetLastChunk, xsetChunkSize, xsetContentLength, xsetLastChunk
 

Field Detail

type

static final org.apache.xmlbeans.SchemaType type

Internal Use Only.

Method Detail

getContent

byte[] getContent()
Returns the document in a binary stream.

Returns:
a binary stream.

xgetContent

org.apache.xmlbeans.XmlBase64Binary xgetContent()

Internal Use Only.


isSetContent

boolean isSetContent()
Checks if the Content element is set.

Returns:
true if the content is set, otherwise false.

setContent

void setContent(byte[] content)

Internal Use Only.


xsetContent

void xsetContent(org.apache.xmlbeans.XmlBase64Binary content)

Internal Use Only.


unsetContent

void unsetContent()

Internal Use Only.


getMimeType

java.lang.String getMimeType()
Returns the mime type of the document.

For a list of possible mime types, see getMimeType.

Returns:
a string containing the document mime type.

xgetMimeType

org.apache.xmlbeans.XmlString xgetMimeType()

Internal Use Only.


isSetMimeType

boolean isSetMimeType()
Checks if the MimeType attribute is set.

Returns:
true if the MimeType is set, otherwise false

setMimeType

void setMimeType(java.lang.String mimeType)

Internal Use Only.


xsetMimeType

void xsetMimeType(org.apache.xmlbeans.XmlString mimeType)

Internal Use Only.


unsetMimeType

void unsetMimeType()

Internal Use Only.