@Test public void testPutWrite() { CKeyValue ckv = new CKeyValue(new byte[] { 0, 0, 0, 8 }); List<CKeyValue> list = new ArrayList<CKeyValue>(); list.add(ckv); Put p1 = new Put(list); ByteArrayOutputStream baos = new ByteArrayOutputStream(); DataOutputStream dos = new DataOutputStream(baos); try { p1.write(dos); } catch (IOException e) { Assert.fail(); } Assert.assertArrayEquals(new byte[] { 0, 0, 0, 1, 4, 0, 0, 0, 0, 0, 0, 8, -120, 127, -1, -1, -1, -1, -1, -1, -1 }, baos.toByteArray()); }
@Override public void write(DataOutput out) throws IOException { out.writeInt(keyValueList.size()); for (CKeyValue keyValue : keyValueList) { keyValue.write(out); } }
Put implements Writable { @Override public void write(DataOutput out) throws IOException { out.writeInt(keyValueList.size()); for (CKeyValue keyValue : keyValueList) { keyValue.write(out); } } }
Put implements Writable { @Override public void write(DataOutput out) throws IOException { out.writeInt(keyValueList.size()); for (CKeyValue keyValue : keyValueList) { keyValue.write(out); } } Put();  Put(Iterable<CKeyValue> keyValueList);  Put(CKeyValue... cKeyValues); }
Put implements Writable { @Override public void write(DataOutput out) throws IOException { out.writeInt(keyValueList.size()); for (CKeyValue keyValue : keyValueList) { keyValue.write(out); } } Put();  Put(Iterable<CKeyValue> keyValueList);  Put(CKeyValue... cKeyValues); Iterable<CKeyValue> getKeyValueList(); @Override boolean equals(Object obj); @Override void write(DataOutput out); @Override int hashCode(); @Override void readFields(DataInput in); }
Put implements Writable { @Override public void write(DataOutput out) throws IOException { out.writeInt(keyValueList.size()); for (CKeyValue keyValue : keyValueList) { keyValue.write(out); } } Put();  Put(Iterable<CKeyValue> keyValueList);  Put(CKeyValue... cKeyValues); Iterable<CKeyValue> getKeyValueList(); @Override boolean equals(Object obj); @Override void write(DataOutput out); @Override int hashCode(); @Override void readFields(DataInput in);  }