|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.inspirel.yami.RawBinaryDataSource
public class RawBinaryDataSource
Serializable wrapper for the raw binary data. Serializable wrapper for the raw binary data allows to use already serialized content for message sending. The two major use cases for this class are efficient message forwarding (when the message is received and its content is used for another message) and support for custom data models and serializers.
Constructor Summary | |
---|---|
RawBinaryDataSource(byte[] buffer)
Constructor. |
Method Summary | |
---|---|
java.util.List<byte[]> |
serialize(int chunkSize)
Serializes the content of this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RawBinaryDataSource(byte[] buffer)
buffer
- binary buffer to be wrappedMethod Detail |
---|
public java.util.List<byte[]> serialize(int chunkSize)
The content is serialized into chunks of the given size, after serialization only the last chunk can be smaller than the requested size.
serialize
in interface YAMISerializable
chunkSize
- chunk size, should be a multiple of 4
or Integer.MAX_VALUE
java.lang.IllegalArgumentException
- if requested chunk size
is not a multiple of 4 and is not
Integer.MAX_VALUE
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |