mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-08 02:40:09 +00:00
java: Template extends MessagePacker
This commit is contained in:
parent
19fd4e755c
commit
dbb28d9a8f
21 changed files with 379 additions and 160 deletions
|
|
@ -23,6 +23,10 @@ import org.msgpack.*;
|
|||
public class StringTemplate implements Template {
|
||||
private StringTemplate() { }
|
||||
|
||||
public void pack(Packer pk, Object target) throws IOException {
|
||||
pk.packString((String)target);
|
||||
}
|
||||
|
||||
public Object unpack(Unpacker pac) throws IOException, MessageTypeException {
|
||||
return pac.unpackString();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue