public void testReadExceptions() throws IOException {
        try {
            m_b64In.read(null, 0, 0);
            fail("should have thrown an NPE");
        }
        catch (NullPointerException e) {
            // ok
        }

        byte[] tmp = new byte[8];
        try {
            m_b64In.read("Zm9vYmFy".getBytes(), -1, 8);
            fail("Should have failed, offset < 0");
        }
        catch (IndexOutOfBoundsException e) {
            //ok
        }

        try {    
            WFBase64.decode("Zm9vYmFy".getBytes(), 9, 8);
            fail("Should have failed, offset > array length");
        }
        catch (IndexOutOfBoundsException e) {
            //ok
        }

        try {
            WFBase64.decode("Zm9vYmFy".getBytes(),  -1, -1);
            fail("Should have failed, offset + len < 0 and len < 0");
        }
        catch (IndexOutOfBoundsException e) {
            //ok
        }

        try {
            WFBase64.decode("Zm9vYmFy".getBytes(), 5, 8);
            fail("Should have failed, offset + len > array legth");
        }
        catch (IndexOutOfBoundsException e) {
            //ok
        }
    }