122123124125126127128129130131132
ObjectInput input = container.getInput(); for (int i=0;i<10;i++) { String value = input.readUTF(); assertEquals("Test" + i ,value); } assertEquals((char)55,input.readChar());
132133134135136137138139140141142
assertEquals(5,input.readLong()); for (int i=0;i<10;i++) { String value = input.readUTF(); assertEquals("Test" + i ,value); } for (byte b=0;b<values.length;b++)
144145146147148149150151152153154
assertEquals((byte)(b+1),input.readByte()); } for (int i=0;i<10;i++) { String value = input.readUTF(); assertEquals("Test" + i ,value); } }
168169170171172173174175176177178
output.write(values); output.flush(); ObjectInput input = container.getInput(); assertEquals("hello",input.readUTF()); for (byte b=0;b<values.length;b++) { assertEquals((byte)(b+1),input.readByte()); }
230231232233234235236237238239240
assertEquals(i,input.readInt()); } for (int i=0;i<10;i++) { assertEquals("String" + i,input.readUTF()); } } public void testWithPrivateWriteAndRead() throws Exception