Ejemplo n.º 1
0
  public void testWrite2() throws IOException {
    FileOutputStream fos = new FileOutputStream("test.cbor");
    Output output = new StreamOutput(fos);
    CborWriter writer = new CborWriter(output);

    Map<String, String> someMap = new HashMap<String, String>();
    someMap.put("hello", "world");
    someMap.put("one", "two");
    someMap.put("test", "catch");

    writer.write(someMap);

    output.close();
  }