Examples of SQLInputImpl


Examples of javax.sql.rowset.serial.SQLInputImpl

     * @tests {@link javax.sql.rowset.serial.SQLInputImpl#readAsciiStream()}
     */
    public void testReadAsciiStream() throws SQLException {
        InputStream stream = new ByteArrayInputStream("abc".getBytes());
        Object[] attributes = new Object[] { stream };
        SQLInputImpl impl = new SQLInputImpl(attributes,
                new HashMap<String, Class<?>>());
        assertEquals(stream, impl.readAsciiStream());

        try {
            impl.readAsciiStream();
            fail("should throw SQLException");
        } catch (SQLException e) {
            // expected
        }

        attributes = new Object[] { null };
        impl = new SQLInputImpl(attributes, new HashMap<String, Class<?>>());
        assertNull(impl.readAsciiStream());
    }
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.