@Test public void testMultiValue() throws IOException { String sEntry1 = "Entry 1"; String sEntry2 = "Entry two"; MultiValue multiValue = new MultiValue(sEntry1.getBytes(), sEntry2.getBytes()); byte[] aBytes = multiValue.toByteArray(); int i = 0; assertEquals(0, aBytes[i++]); assertEquals(0, aBytes[i++]); assertEquals(0, aBytes[i++]); assertEquals(2, aBytes[i++]); assertEquals(0, aBytes[i++]); assertEquals(0, aBytes[i++]); assertEquals(0, aBytes[i++]); assertEquals(sEntry1.length(), aBytes[i++]); byte[] aEntry1Bytes = sEntry1.getBytes(); for (int j = 0; j < aEntry1Bytes.length; j++) { assertEquals(aEntry1Bytes[j], aBytes[i++]); } assertEquals(0, aBytes[i++]); assertEquals(0, aBytes[i++]); assertEquals(0, aBytes[i++]); assertEquals(sEntry2.length(), aBytes[i++]); byte[] aEntry2Bytes = sEntry2.getBytes(); for (int j = 0; j < aEntry2Bytes.length; j++) { assertEquals(aEntry2Bytes[j], aBytes[i++]); } }
public MultiValue(byte[]... values) { this(Arrays.asList(values)); }
MultiValue { public MultiValue(byte[]... values) { this(Arrays.asList(values)); } }
MultiValue { public MultiValue(byte[]... values) { this(Arrays.asList(values)); } MultiValue(byte[]... values); private  MultiValue(List<byte[]> values); }
MultiValue { public MultiValue(byte[]... values) { this(Arrays.asList(values)); } MultiValue(byte[]... values); private  MultiValue(List<byte[]> values); byte[] toByteArray(); static MultiValue from(byte[] abValues); static MultiValue from(InputStream input); byte[] get(int index); }
MultiValue { public MultiValue(byte[]... values) { this(Arrays.asList(values)); } MultiValue(byte[]... values); private  MultiValue(List<byte[]> values); byte[] toByteArray(); static MultiValue from(byte[] abValues); static MultiValue from(InputStream input); byte[] get(int index);  }