62636465666768
public Unpacker createUnpacker(InputStream stream) { return new MessagePackUnpacker(this, stream); } public BufferUnpacker createBufferUnpacker() { return new MessagePackBufferUnpacker(); }
222223224225226227228229
return globalMessagePack.read(buffer); } @Deprecated public static <T> T unpack(byte[] buffer, Template<T> tmpl) throws IOException { BufferUnpacker u = new MessagePackBufferUnpacker(globalMessagePack).wrap(buffer); return tmpl.read(u, null); }
228229230231232233234235
return tmpl.read(u, null); } @Deprecated public static <T> T unpack(byte[] buffer, Template<T> tmpl, T to) throws IOException { BufferUnpacker u = new MessagePackBufferUnpacker(globalMessagePack).wrap(buffer); return tmpl.read(u, to); }
20212223242526
final private BufferUnpacker unpacker; public BytesToValue(Provider<byte[]> provider) { super(provider, Counter.class); this.unpacker = new MessagePackBufferUnpacker(new MessagePack()); }