136137138139140141142143144145146
DataInputStream in1 = new DataInputStream(new ByteArrayInputStream(ba1)); DataInputStream in2 = new DataInputStream(new ByteArrayInputStream(ba2)); DataJoinKey k_1 = new DataJoinKey(); k_1.readFields(in1); DataJoinKey k_2 = new DataJoinKey(); k_2.readFields(in2); Assert.assertEquals(-1, k_1.compareTo(k_2));
139140141142143144145146147148149
DataJoinKey k_1 = new DataJoinKey(); k_1.readFields(in1); DataJoinKey k_2 = new DataJoinKey(); k_2.readFields(in2); Assert.assertEquals(-1, k_1.compareTo(k_2)); Assert.assertEquals(-1, k_1.compare(ba1, 0, ba1.length, ba2, 0, ba2.length)); }