Code example for CheckedInputStream

0
        assertReadsFailWithIoException(new BufferedInputStream(null));
        assertReadsFailWithIoException(new BufferedInputStream(null, 1024));
    } 
 
    public void testCheckedInputStream() throws IOException { 
        assertReadsFailWithNullPointerException(new CheckedInputStream(null, new CRC32()));
    } 
 
    public void testCipherInputStream() throws IOException { 
        InputStream in = new CipherInputStream(null, new NullCipher());
        try { 
            in.read();
            fail();
        } catch (NullPointerException expected) {
        } 
 
        assertEquals(0, in.available());
 
        try { 
            in.close();
Contextual code suggestions in your IDE  Get Codota for Java