Code example for PipedInputStream

Methods: close

0
        monitor.setStderrObserver(stderrObserver);
        monitor.start();
    } 
 
    protected void tearDown() throws Exception { 
        inHandle.close();
        outHandle.close();
        errHandle.close();
    } 
 
    public void testObserverIsTriggeredOnAvailableData() throws IOException, InterruptedException { 
        outHandle.write("part1".getBytes());
        outHandle.flush();
        Thread.sleep(25);
        outHandle.write("part2".getBytes());
        outHandle.flush();
        Thread.sleep(25);
        outHandle.write("part3".getBytes());
        outHandle.flush();
        Thread.sleep(25);
Contextual code suggestions in your IDE  Get Codota for Java