java: Template extends MessagePacker

This commit is contained in:
frsyuki 2010-10-24 18:46:48 +09:00
parent 19fd4e755c
commit dbb28d9a8f
21 changed files with 379 additions and 160 deletions

View file

@ -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();
}