Code example for CheckedInputStream

Methods: closeread

0
 
    public void test_read$byteII() throws Exception { 
        // testing that the return by skip is valid 
        InputStream checkInput = Support_Resources
                .getStream("hyts_checkInput.txt"); 
        CheckedInputStream checkIn = new CheckedInputStream(checkInput,
                new CRC32());
        byte buff[] = new byte[50];
        checkIn.read(buff, 10, 5);
        checkIn.close();
        try { 
            checkIn.read(buff, 10, 5);
            fail("IOException expected.");
        } catch (IOException ee) {
            // expected 
        } 
        checkInput.close();
    } 
} 
Connect your IDE to all the code out there  Get Codota for Java