public static class MessagePack.PackerConfig
extends java.lang.Object
implements java.lang.Cloneable
Constructor and Description |
---|
PackerConfig() |
Modifier and Type | Method and Description |
---|---|
MessagePack.PackerConfig |
clone() |
boolean |
equals(java.lang.Object obj) |
int |
getBufferFlushThreshold() |
int |
getBufferSize() |
int |
getSmallStringOptimizationThreshold() |
int |
hashCode() |
boolean |
isStr8FormatSupport() |
MessageBufferPacker |
newBufferPacker()
Create a packer for storing packed data into a byte array
|
MessagePacker |
newPacker(MessageBufferOutput out)
Create a packer that outputs the packed data to a given output
|
MessagePacker |
newPacker(java.io.OutputStream out)
Create a packer that outputs the packed data to a given output stream
|
MessagePacker |
newPacker(java.nio.channels.WritableByteChannel channel)
Create a packer that outputs the packed data to a given output channel
|
MessagePack.PackerConfig |
withBufferFlushThreshold(int bytes)
When the next payload size exceeds this threshold, MessagePacker will call MessageBufferOutput.flush() before
packing the data (default: 8192).
|
MessagePack.PackerConfig |
withBufferSize(int bytes)
When a packer is created with newPacker(OutputStream) or newPacker(WritableByteChannel), the stream will be
buffered with this size of buffer (default: 8192).
|
MessagePack.PackerConfig |
withSmallStringOptimizationThreshold(int bytes)
Use String.getBytes() for converting Java Strings that are smaller than this threshold into UTF8.
|
MessagePack.PackerConfig |
withStr8FormatSupport(boolean str8FormatSupport)
Disable str8 format when needed backward compatibility between
different msgpack serializer versions.
|
public MessagePack.PackerConfig clone()
clone
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public MessagePacker newPacker(MessageBufferOutput out)
out
- public MessagePacker newPacker(java.io.OutputStream out)
out
- public MessagePacker newPacker(java.nio.channels.WritableByteChannel channel)
channel
- public MessageBufferPacker newBufferPacker()
public MessagePack.PackerConfig withSmallStringOptimizationThreshold(int bytes)
public int getSmallStringOptimizationThreshold()
public MessagePack.PackerConfig withBufferFlushThreshold(int bytes)
public int getBufferFlushThreshold()
public MessagePack.PackerConfig withBufferSize(int bytes)
public int getBufferSize()
public MessagePack.PackerConfig withStr8FormatSupport(boolean str8FormatSupport)
public boolean isStr8FormatSupport()