Package org.apache.derby.impl.jdbc

Examples of org.apache.derby.impl.jdbc.PositionedStoreStream.reposition()


        // This step is crucial, position must be different than zero when the
        // first exception below is thrown.
        pss.reposition(size / 2); // Goto middle.
        assertEquals(size / 2, pss.getPosition());
        try {
            pss.reposition(size *2); // Try to go past end.
            fail("Should have failed with EOFException");
        } catch (EOFException eofe) {
            // Ignore this exception
        }
        // Failed here before, because internal state was inconsistent.
View Full Code Here


            // Ignore this exception
        }
        // Failed here before, because internal state was inconsistent.
        // Assumed: pos = 5, underlying stream at pos 5, skipped (size -1 - pos)
        // Actual: pos = 5, underlying stream at pos (size -1)
        pss.reposition(size -1); // Goto end.
        assertEquals(size -1, pss.getPosition());
        assertEquals('j', pss.read());
    }

    public static Test suite() {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.