public class ByteArrayPollingResult extends PollingResult
This class provides default handling of byte array results. You need only override methods where the default behaviour needs changing.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
copyright |
Constructor and Description |
---|
ByteArrayPollingResult(PollingInputConnector connector,
byte[] data)
Provides a default implementation.
|
ByteArrayPollingResult(PollingInputConnector connector,
byte[] data,
long offset)
Provides a default implementation.
|
Modifier and Type | Method and Description |
---|---|
InputRecord |
buildInputRecord()
Provides a default implementation of buildInputRecord.
|
byte[] |
getBytes()
Returns the data associated with this result.
|
long |
getOffset()
Returns the offset passed in on the constructor, or if the two argument constructor was used, the Length of the byte array.
|
buildProperties, confirm, getConnector, logResult, markAsFailed, resultSource
public static final java.lang.String copyright
public ByteArrayPollingResult(PollingInputConnector connector, byte[] data) throws com.ibm.broker.plugin.MbException
connector
- The owning connector.data
- The data to be passed to the flow.com.ibm.broker.plugin.MbException
public ByteArrayPollingResult(PollingInputConnector connector, byte[] data, long offset) throws com.ibm.broker.plugin.MbException, java.lang.IndexOutOfBoundsException
connector
- The owning connector.data
- The data to be passed to the flow.offset
- The offset into data.com.ibm.broker.plugin.MbException
java.lang.IndexOutOfBoundsException
- Thrown if offset is negative or greater than the Length of data.public InputRecord buildInputRecord() throws com.ibm.broker.plugin.MbException
buildInputRecord
in class PollingResult
com.ibm.broker.plugin.MbException
public final byte[] getBytes()
public final long getOffset()