public class

StreamingContext

extends Object
implements IContentConsumer
java.lang.Object
   ↳ com.microstrategy.webapi.StreamingContext
Known Direct Subclasses

Summary

Constants
String CONTENT_LENGTH_NAME
int STREAMING_BUF_SIZE
Fields
protected boolean _canRedirect
protected ContainerServices _containerServices
protected int _contentLength
protected Exception _ex
Public Constructors
StreamingContext(ContainerServices cs)
Public Methods
boolean canRedirect()
void consume(int contentLength, InputStream src)
Request to a consumer to consume specified number of bytes from the input stream
void consume(String decode, int contentLength, InputStream src)
Request to a consumer to consume specified number of bytes from the input stream
int getContextLength()
Exception getException()
Returns the exception that caused consumption interruption.
Protected Methods
void setContentLength(int contentLength)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.microstrategy.webapi.IContentConsumer

Constants

public static final String CONTENT_LENGTH_NAME

Constant Value: "total-length"

protected static final int STREAMING_BUF_SIZE

Constant Value: 10240 (0x00002800)

Fields

protected boolean _canRedirect

protected ContainerServices _containerServices

protected int _contentLength

protected Exception _ex

Public Constructors

public StreamingContext (ContainerServices cs)

Public Methods

public boolean canRedirect ()

public void consume (int contentLength, InputStream src)

Request to a consumer to consume specified number of bytes from the input stream

Parameters
contentLength number of bytes to consume.
src source input stream
Throws
Exception

public void consume (String decode, int contentLength, InputStream src)

Request to a consumer to consume specified number of bytes from the input stream

Parameters
decode decoder charset name
contentLength number of bytes to consume.
src source input stream
Throws
Exception

public int getContextLength ()

public Exception getException ()

Returns the exception that caused consumption interruption.

Returns
  • the exception that caused consumption interruption.

Protected Methods

protected void setContentLength (int contentLength)