Code example for PipedInputStream

Methods: read

0
 
    /** 
     * @tests java.io.PipedInputStream#read(byte[], int, int) 
     */ 
    public void test_read$BII_4() throws IOException { 
        PipedInputStream obj = new PipedInputStream();
        try { 
            obj.read(new byte[0], -1, -1);
            fail("IndexOutOfBoundsException expected");
        } catch (ArrayIndexOutOfBoundsException t) {
            fail("IndexOutOfBoundsException expected");
        } catch (IndexOutOfBoundsException t) {
        } 
    } 
 
    /** 
     * @tests java.io.PipedInputStream#receive(int) 
     */ 
    public void test_receive() throws IOException { 
        pis = new PipedInputStream();
        pos = new PipedOutputStream();