@Override
 public Runlist read(Unpacker unpacker, Runlist runlist, boolean required) throws IOException {
   if (!required && unpacker.trySkipNil()) {
     return Runlist.empty();
   }
   Map<String, String> list = unpacker.read(Templates.tMap(Templates.TString, Templates.TString));
   return new Runlist(list);
 }
Ejemplo n.º 2
0
  public static void main(String[] args) throws IOException {
    List<String> src = new ArrayList<String>();
    src.add("msgpack");
    src.add("kumofs");
    src.add("viver");

    MessagePack msgpack = new MessagePack();

    byte[] raw = msgpack.write(src);

    List<String> dst1 = msgpack.read(raw, Templates.tList(Templates.TString));

    for (String temp : dst1) {
      System.out.println(temp);
    }
  }