357358359360361362363364365366367
{ for (Map.Entry<String,Object> entry : map.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); Type type = encoding(value); writeStr8(key); put(type.code); write(type, value); } }
379380381382383384385386387388
protected void writeListEntries(List<Object> list) { for (Object value : list) { Type type = encoding(value); put(type.code); write(type, value); } }
397398399400401402403404405406407
endSize32(pos); } protected void writeArrayEntries(List<Object> array) { Type type; if (array.isEmpty()) { return; }
274275276277278279280281282283284
Map<String,Object> result = new LinkedHashMap(); for (int i = 0; i < count; i++) { String key = readStr8(); byte code = get(); Type t = getType(code); Object value = read(t); result.put(key, value); } return result;
302303304305306307308309310311312
List<Object> result = new ArrayList(); for (int i = 0; i < count; i++) { byte code = get(); Type t = getType(code); Object value = read(t); result.add(value); } return result; }
319320321322323324325326327328329
{ return null; } byte code = get(); Type t = getType(code); long count = readUint32(); if (count == 0) { return Collections.EMPTY_LIST;
338339340341342343344345346347348
return result; } private Type getType(byte code) { Type type = Type.get(code); if (type == null) { throw new IllegalArgumentException("unknown code: " + code); } else