IOUtils.copy(reader, out, null);
// note: this method *does* flush.
// note: we don't flush here; this IOUtils method does it for us
assertEquals("Sizes differ", inData.length, baout.size());
assertTrue("Content differs", Arrays.equals(inData, baout.toByteArray()));
}
//-----------------------------------------------------------------------
public void testCopy_readerToWriter() throws Exception {
InputStream in = new ByteArrayInputStream(inData);