Code example for PipedInputStream

Methods: read

0
    /** 
     * @tests java.io.PipedInputStream#read(byte[], int, int) 
     * Regression for HARMONY-387 
     */ 
    public void test_read$BII_2() throws IOException { 
        PipedInputStream obj = new PipedInputStream();
        try { 
            obj.read(new byte[0], 0, -1);
            fail("IndexOutOfBoundsException expected");
        } catch (IndexOutOfBoundsException t) {
            assertEquals(
                    "IndexOutOfBoundsException rather than a subclass expected", 
                    IndexOutOfBoundsException.class, t.getClass());
        } 
    } 
 
    /** 
     * @tests java.io.PipedInputStream#read(byte[], int, int) 
     */ 
    public void test_read$BII_3() throws IOException { 
        PipedInputStream obj = new PipedInputStream();