protected synchronized void write(final DataOutput ostream) throws IOException { ostream.writeShort( max ); ostream.writeShort( nextPartition ); ostream.writeInt(symbols.size()); symbols.forEachEntry(new TObjectIntProcedure() { public boolean execute(Object key, int val) { try { ostream.writeUTF((String) key); ostream.writeShort((short) val); } catch (IOException ioe) { return false; } return true; } }); changed = false; }
protected synchronized void write(final DataOutput ostream) throws IOException { ostream.writeShort(max); ostream.writeShort(nextPartition); ostream.writeInt(symbols.size()); for (Iterator i = symbols.entrySet().iterator(); i.hasNext();) { final Object2IntMap.Entry entry = (Object2IntMap.Entry) i.next(); ostream.writeUTF((String) entry.getKey()); ostream.writeShort((short) entry.getIntValue()); }            changed = false; }
    protected synchronized void write(final DataOutput ostream) throws IOException {        ostream.writeShort( max );        ostream.writeShort( nextPartition );        ostream.writeInt(symbols.size());        symbols.forEachEntry(new TObjectIntProcedure() {            public boolean execute(Object key, int val) {                try {                    ostream.writeUTF((String) key);                    ostream.writeShort((short) val);                } catch (IOException ioe) {                    return false;                }                return true;            }        });        changed = false;    }