protected void write(DataOutput out) throws IOException { int length=length(); out.writeByte(length); if(keys == null) return; for(int i=0; i < keys.length; i++) { byte[] k=keys[i]; if(k != null) { out.writeByte(k.length); out.write(k); byte[] v=values[i]; out.writeByte(v != null? v.length : 0); if(v != null) out.write(v); } } }
protected void write(DataOutput out) throws IOException { int length=length(); out.writeByte(length); if(keys == null) return; for(int i=0; i < keys.length; i++) { byte[] k=keys[i]; if(k != null) { out.writeByte(k.length); out.write(k); byte[] v=values[i]; out.writeByte(v != null? v.length : 0); if(v != null) out.write(v); } } }