public abstract class TableMessageFormat<T extends TableMessageFormatType> extends Object implements XMessageFormat<T>
XMessageFormat
functionalitiesConstructor and Description |
---|
TableMessageFormat(T data) |
Modifier and Type | Method and Description |
---|---|
T |
readAsNative()
Reads the native value of the payload
|
InputStream |
readAsStream()
Reads the payload as an input stream
|
String |
readAsString(int maxLengthKbs)
Reads the payload as a string.
|
long |
size()
Returns the number of rows in the table message format
|
void |
writeTo(OutputStream outputStream)
Writes the payload into the given output stream
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
copyOf, markAsAttachedToaMessage, releaseResources
protected T extends TableMessageFormatType data
public TableMessageFormat(T data)
public InputStream readAsStream()
XMessageFormat
readAsStream
in interface XMessageFormat<T extends TableMessageFormatType>
public String readAsString(int maxLengthKbs)
XMessageFormat
maxLengthKbs
, the output
will represent a truncated payload. Otherwise the the output will represent the full payload.
Depending on the type of the payload, the size of the resulting String will not be exactly the given size, but
rather an approximate value.readAsString
in interface XMessageFormat<T extends TableMessageFormatType>
maxLengthKbs
- the maximum length of the payload in kilo bytes to be read. Set this value as -1 to read the
full payloadpublic T readAsNative()
XMessageFormat
readAsNative
in interface XMessageFormat<T extends TableMessageFormatType>
public void writeTo(OutputStream outputStream) throws IOException
XMessageFormat
writeTo
in interface XMessageFormat<T extends TableMessageFormatType>
outputStream
- the output stream to which the payload has to be writtenIOException
- in case of an I/O errorpublic long size()
size
in interface XMessageFormat<T extends TableMessageFormatType>
Copyright © 2016–2019 AdroitLogic. All rights reserved.