List of usage examples for java.io ByteArrayOutputStream toString
public synchronized String toString()
From source file:com.adaptris.util.stream.StreamUtilTest.java
@Test public void testMakeCopy() throws Exception { ByteArrayInputStream in = new ByteArrayInputStream(TEXT.getBytes()); InputStream in2 = StreamUtil.makeCopy(in); ByteArrayOutputStream out = new ByteArrayOutputStream(); IOUtils.copy(in2, out);/*from www .jav a 2 s .c om*/ assertEquals(TEXT, out.toString()); }