@Test public void decode() throws Exception { }
public Map<String, String> decode(byte[] bytes) throws DeserializationException { Map<String, String> map = new HashMap<String, String>(); if (bytes == null || bytes.length == 0) { return map; } UnsafeByteArrayInputStream in = new UnsafeByteArrayInputStream(bytes); try { while (in.available() > 0) { String key = readString(in); String value = readString(in); if (key != null && value != null) { map.put(key, value); } } return map; } catch (IOException ex) { throw new DeserializationException(ex.getMessage(), ex); } }
SimpleMapSerializer { public Map<String, String> decode(byte[] bytes) throws DeserializationException { Map<String, String> map = new HashMap<String, String>(); if (bytes == null || bytes.length == 0) { return map; } UnsafeByteArrayInputStream in = new UnsafeByteArrayInputStream(bytes); try { while (in.available() > 0) { String key = readString(in); String value = readString(in); if (key != null && value != null) { map.put(key, value); } } return map; } catch (IOException ex) { throw new DeserializationException(ex.getMessage(), ex); } } }
SimpleMapSerializer { public Map<String, String> decode(byte[] bytes) throws DeserializationException { Map<String, String> map = new HashMap<String, String>(); if (bytes == null || bytes.length == 0) { return map; } UnsafeByteArrayInputStream in = new UnsafeByteArrayInputStream(bytes); try { while (in.available() > 0) { String key = readString(in); String value = readString(in); if (key != null && value != null) { map.put(key, value); } } return map; } catch (IOException ex) { throw new DeserializationException(ex.getMessage(), ex); } }  }
SimpleMapSerializer { public Map<String, String> decode(byte[] bytes) throws DeserializationException { Map<String, String> map = new HashMap<String, String>(); if (bytes == null || bytes.length == 0) { return map; } UnsafeByteArrayInputStream in = new UnsafeByteArrayInputStream(bytes); try { while (in.available() > 0) { String key = readString(in); String value = readString(in); if (key != null && value != null) { map.put(key, value); } } return map; } catch (IOException ex) { throw new DeserializationException(ex.getMessage(), ex); } }  byte[] encode(Map<String, String> map); Map<String, String> decode(byte[] bytes); int readInt(InputStream in); }
SimpleMapSerializer { public Map<String, String> decode(byte[] bytes) throws DeserializationException { Map<String, String> map = new HashMap<String, String>(); if (bytes == null || bytes.length == 0) { return map; } UnsafeByteArrayInputStream in = new UnsafeByteArrayInputStream(bytes); try { while (in.available() > 0) { String key = readString(in); String value = readString(in); if (key != null && value != null) { map.put(key, value); } } return map; } catch (IOException ex) { throw new DeserializationException(ex.getMessage(), ex); } }  byte[] encode(Map<String, String> map); Map<String, String> decode(byte[] bytes); int readInt(InputStream in);  }