Code example for FilterOutputStream

Methods: writewrite

    public void test_write$B() throws IOException { 
        Support_OutputStream sos = new Support_OutputStream(testLength);
        os = new FilterOutputStream(sos);
        bis = new ByteArrayInputStream(sos.toByteArray());
        assertTrue("Test 1: Bytes have not been written.",
                bis.available() == testLength);
        byte[] wbytes = new byte[testLength];, 0, testLength);
        assertTrue("Test 2: Incorrect bytes written or read.",
                fileString.equals(new String(wbytes)));
        try { 
            // Support_OutputStream throws an IOException if the internal 
            // buffer is full, which it should be now. 
            fail("Test 2: IOException expected.");
        } catch (IOException e) {
            // Expected. 
Stop searching for code, let great code find you!  Add Codota to your java IDE