@Override public void streamFrom(InputStream in) throws IOException { this.data .clear(); // Just in case we're called on an old object instead of a new one: wipe out the // old data. int length = Streamable.Helper.intFromStream(in); if (length <= 0) return; for (int i = 0; i < length; i++) { String k = Streamable.Helper.stringFromStream(in); String v = Streamable.Helper.stringFromStream(in); put(k, v); } }