Code example for ByteArrayOutputStream

Methods: sleep, toString

0
    public void testIO() throws InterruptedException 
    { 
        // Only a little test 
        ByteArrayInputStream in = new ByteArrayInputStream
            ("The quick brown fox jumped over the lazy dog".getBytes());
        ByteArrayOutputStream out = new ByteArrayOutputStream();
 
        IO.copyThread(in,out);
        Thread.sleep(1500);
        System.err.println(out);
 
        assertEquals( "copyThread",
                      out.toString(),
                      "The quick brown fox jumped over the lazy dog"); 
    } 
 
     
 
    /* ------------------------------------------------------------ */ 
    public void testStringSpeed() 
    {