}
}
public void test (TestHarness harness)
{
ByteArrayOutputStream baos = new ByteArrayOutputStream();
FilterOutputStream fos = new FilterOutputStream(baos);;
byte[] ba = {(byte)'B', (byte)'C', (byte)'D'};
try {
String tststr = "ABCD";
fos.write('A');
harness.check(true, "write(int)");
fos.write(ba);
harness.check(true, "write(buf)");
fos.write(ba,0,3);
harness.check(true, "write(buf,off,len)");
byte[] finalba = baos.toByteArray();
String finalstr2 = new String(finalba);
harness.check(finalstr2.equals("ABCDBCD"), "wrote all characters okay");
baos.flush();