public interface MessageFormat
Modifier and Type | Method and Description |
---|---|
Serializable |
asSerializableObject()
Get the data as a Serializable Java object
|
MessageFormat |
clonePayload() |
void |
detach()
Detach this payload from the Message.
|
InputStream |
getInputStream()
Get an InputStream to the message payload
|
String |
getMessageFormat()
Get the name of the message format
|
boolean |
isDetached()
Check if this payload is detached from its parent message
|
boolean |
isModified()
Does this message hold updated content?
|
long |
length()
Gives the length of the format, in other words the size of the payload.
|
void |
releaseResources()
Release any resources on this "detached" payload
|
String |
toString()
Return a possibly trimmed/size limited String representation of the payload
|
void |
writeTo(OutputStream os)
Write the message payload to the given OutputStream
|
String getMessageFormat()
boolean isModified()
void detach()
void releaseResources()
boolean isDetached()
String toString()
Serializable asSerializableObject() throws FormatConversionException
FormatConversionException
void writeTo(OutputStream os) throws IOException
os
- the OutputStream to serialize the message intoIOException
- on an IO errorInputStream getInputStream() throws IOException
IOException
- on an IO errorlong length()
However it is not recommended to serialize the input stream in-order to find the length unless you are certain that it is required, or you are just about to consume the stream, for example in a transport sender or before discarding a message etc..
MessageFormat clonePayload()
Copyright © 2010–2016 AdroitLogic. All rights reserved.