Package org.apache.derby.iapi.services.io

Examples of org.apache.derby.iapi.services.io.ArrayInputStream.skip()


     * Test that we don't get an overflow when the argument to skip() is
     * Long.MAX_VALUE (DERBY-3739).
     */
    public void testSkipLongMaxValue() throws IOException {
        ArrayInputStream ais = new ArrayInputStream(new byte[1000]);
        assertEquals(1000, ais.skip(Long.MAX_VALUE));
        assertEquals(1000, ais.getPosition());
        ais.setPosition(1);
        assertEquals(999, ais.skip(Long.MAX_VALUE));
        assertEquals(1000, ais.getPosition());
    }
View Full Code Here


    public void testSkipLongMaxValue() throws IOException {
        ArrayInputStream ais = new ArrayInputStream(new byte[1000]);
        assertEquals(1000, ais.skip(Long.MAX_VALUE));
        assertEquals(1000, ais.getPosition());
        ais.setPosition(1);
        assertEquals(999, ais.skip(Long.MAX_VALUE));
        assertEquals(1000, ais.getPosition());
    }

    /**
     * Test that we don't get an overflow when the argument to skipBytes() is
View Full Code Here

    /**
     * Test that skip() returns 0 when the argument is negative (DERBY-3739).
     */
    public void testSkipNegative() throws IOException {
        ArrayInputStream ais = new ArrayInputStream(new byte[1000]);
        assertEquals(0, ais.skip(-1));
    }

    /**
     * Test that skipBytes() returns 0 when the argument is negative
     * (DERBY-3739).
 
View Full Code Here

     * Test that we don't get an overflow when the argument to skip() is
     * Long.MAX_VALUE (DERBY-3739).
     */
    public void testSkipLongMaxValue() throws IOException {
        ArrayInputStream ais = new ArrayInputStream(new byte[1000]);
        assertEquals(1000, ais.skip(Long.MAX_VALUE));
        assertEquals(1000, ais.getPosition());
        ais.setPosition(1);
        assertEquals(999, ais.skip(Long.MAX_VALUE));
        assertEquals(1000, ais.getPosition());
    }
View Full Code Here

    public void testSkipLongMaxValue() throws IOException {
        ArrayInputStream ais = new ArrayInputStream(new byte[1000]);
        assertEquals(1000, ais.skip(Long.MAX_VALUE));
        assertEquals(1000, ais.getPosition());
        ais.setPosition(1);
        assertEquals(999, ais.skip(Long.MAX_VALUE));
        assertEquals(1000, ais.getPosition());
    }

    /**
     * Test that we don't get an overflow when the argument to skipBytes() is
View Full Code Here

    /**
     * Test that skip() returns 0 when the argument is negative (DERBY-3739).
     */
    public void testSkipNegative() throws IOException {
        ArrayInputStream ais = new ArrayInputStream(new byte[1000]);
        assertEquals(0, ais.skip(-1));
    }

    /**
     * Test that skipBytes() returns 0 when the argument is negative
     * (DERBY-3739).
 
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.