public class MessagePack
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
MessagePack.Code
The prefix code set of MessagePack.
|
static class |
MessagePack.Config
Message packer/unpacker configuration object
|
static class |
MessagePack.ConfigBuilder
Builder of the configuration object
|
Modifier and Type | Field and Description |
---|---|
static MessagePack |
DEFAULT
Default MessagePack packer/unpacker factory
|
static java.nio.charset.Charset |
UTF8 |
Constructor and Description |
---|
MessagePack() |
MessagePack(MessagePack.Config config) |
Modifier and Type | Method and Description |
---|---|
static MessagePacker |
newDefaultPacker(java.io.OutputStream out)
Create a MessagePacker that outputs the packed data to the specified stream, using the default configuration
|
static MessagePacker |
newDefaultPacker(java.nio.channels.WritableByteChannel channel)
Create a MessagePacker that outputs the packed data to the specified channel, using the default configuration
|
static MessageUnpacker |
newDefaultUnpacker(byte[] arr)
Create a MessageUnpacker that reads data from the given byte array, using the default configuration
|
static MessageUnpacker |
newDefaultUnpacker(byte[] arr,
int offset,
int length)
Create a MessageUnpacker that reads data form the given byte array [offset, ..
|
static MessageUnpacker |
newDefaultUnpacker(java.io.InputStream in)
Create a MessageUnpacker that reads data from then given InputStream, using the default configuration
|
static MessageUnpacker |
newDefaultUnpacker(java.nio.channels.ReadableByteChannel channel)
Create a MessageUnpacker that reads data from the given channel, using the default configuration
|
MessagePacker |
newPacker(java.io.OutputStream out)
Create a MessagePacker that outputs the packed data to the specified stream
|
MessagePacker |
newPacker(java.nio.channels.WritableByteChannel channel)
Create a MessagePacker that outputs the packed data to the specified channel
|
MessageUnpacker |
newUnpacker(byte[] arr)
Create a MessageUnpacker that reads data from the given byte array.
|
MessageUnpacker |
newUnpacker(byte[] arr,
int offset,
int length)
Create a MessageUnpacker that reads data from the given byte array [offset, offset+length)
|
MessageUnpacker |
newUnpacker(java.io.InputStream in)
Create a MessageUnpacker that reads data from the given InputStream.
|
MessageUnpacker |
newUnpacker(java.nio.channels.ReadableByteChannel in)
Create a MessageUnpacker that reads data from the given ReadableByteChannel.
|
public static final java.nio.charset.Charset UTF8
public static final MessagePack DEFAULT
public MessagePack()
public MessagePack(MessagePack.Config config)
public static MessagePacker newDefaultPacker(java.io.OutputStream out)
out
- public static MessagePacker newDefaultPacker(java.nio.channels.WritableByteChannel channel)
channel
- public static MessageUnpacker newDefaultUnpacker(java.io.InputStream in)
in
- public static MessageUnpacker newDefaultUnpacker(java.nio.channels.ReadableByteChannel channel)
channel
- public static MessageUnpacker newDefaultUnpacker(byte[] arr)
arr
- public static MessageUnpacker newDefaultUnpacker(byte[] arr, int offset, int length)
arr
- offset
- length
- public MessagePacker newPacker(java.io.OutputStream out)
out
- public MessagePacker newPacker(java.nio.channels.WritableByteChannel channel)
channel
- public MessageUnpacker newUnpacker(java.io.InputStream in)
MessageUnpacker(byte[])
or MessageUnpacker(byte[], int, int)
instead of this constructor.in
- public MessageUnpacker newUnpacker(java.nio.channels.ReadableByteChannel in)
in
- public MessageUnpacker newUnpacker(byte[] arr)
arr
- public MessageUnpacker newUnpacker(byte[] arr, int offset, int length)
arr
- offset
- length
-