Package javax.sql.rowset.serial

Examples of javax.sql.rowset.serial.SerialClob.truncate()


        }
    }

    public void testTruncate() throws Exception {
        SerialClob serialClob = new SerialClob("hello".toCharArray());
        serialClob.truncate(3);
        assertEquals(3, serialClob.length());
        String s = serialClob.getSubString(1, 3);
        assertEquals("hel", s);
        serialClob.truncate(0);
        assertEquals(0, serialClob.length());
View Full Code Here


        SerialClob serialClob = new SerialClob("hello".toCharArray());
        serialClob.truncate(3);
        assertEquals(3, serialClob.length());
        String s = serialClob.getSubString(1, 3);
        assertEquals("hel", s);
        serialClob.truncate(0);
        assertEquals(0, serialClob.length());

        serialClob = new SerialClob("hello".toCharArray());
        try {
            serialClob.truncate(10);
View Full Code Here

        serialClob.truncate(0);
        assertEquals(0, serialClob.length());

        serialClob = new SerialClob("hello".toCharArray());
        try {
            serialClob.truncate(10);
            fail("should throw SerialException");
        } catch (SerialException e) {
            // expected
        }
View Full Code Here

        } catch (SerialException e) {
            // expected
        }

        try {
            serialClob.truncate(-1);
            fail("should throw SerialException");
        } catch (SerialException e) {
            // expected
        }
    }
View Full Code Here

        }
    }

    public void testTruncate() throws Exception {
        SerialClob serialClob = new SerialClob("hello".toCharArray());
        serialClob.truncate(3);
        assertEquals(3, serialClob.length());
        String s = serialClob.getSubString(1, 3);
        assertEquals("hel", s);
        serialClob.truncate(0);
        assertEquals(0, serialClob.length());
View Full Code Here

        SerialClob serialClob = new SerialClob("hello".toCharArray());
        serialClob.truncate(3);
        assertEquals(3, serialClob.length());
        String s = serialClob.getSubString(1, 3);
        assertEquals("hel", s);
        serialClob.truncate(0);
        assertEquals(0, serialClob.length());

        serialClob = new SerialClob("hello".toCharArray());
        try {
            serialClob.truncate(10);
View Full Code Here

        serialClob.truncate(0);
        assertEquals(0, serialClob.length());

        serialClob = new SerialClob("hello".toCharArray());
        try {
            serialClob.truncate(10);
            fail("should throw SerialException");
        } catch (SerialException e) {
            // expected
        }
View Full Code Here

        } catch (SerialException e) {
            // expected
        }

        try {
            serialClob.truncate(-1);
            fail("should throw SerialException");
        } catch (SerialException e) {
            // expected
        }
    }
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.