예제 #1
0
  private void putMap(String name, Map m) {
    _put(OBJECT, name);
    final int sizePos = _buf.getPosition();
    _buf.writeInt(0);

    for (Map.Entry entry : (Set<Map.Entry>) m.entrySet())
      _putObjectField(entry.getKey().toString(), entry.getValue());

    _buf.write(EOO);
    _buf.writeInt(sizePos, _buf.getPosition() - sizePos);
  }
예제 #2
0
 public void putAll(final Map m) {
   for (final Map.Entry entry : m.entrySet()) {
     this.put(entry.getKey().toString(), entry.getValue());
   }
 }