mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-03-30 07:26:29 +02:00
use larger buffer size on MessagePack.pack
This commit is contained in:
parent
6630a643d3
commit
6d8c3bd13d
@ -26,7 +26,7 @@ import org.msgpack.template.FieldList;
|
||||
|
||||
public class MessagePack {
|
||||
public static byte[] pack(Object obj) {
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream(1024);
|
||||
try {
|
||||
new Packer(out).pack(obj);
|
||||
} catch (IOException e) {
|
||||
@ -40,7 +40,7 @@ public class MessagePack {
|
||||
}
|
||||
|
||||
public static byte[] pack(Object obj, Template tmpl) throws MessageTypeException {
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream(1024);
|
||||
try {
|
||||
new Packer(out).pack(obj, tmpl);
|
||||
} catch (IOException e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user