Package javax.sql.rowset.serial

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


                            ex.getMessage()));
                        }
                        // get the attributes from the struct
                        Object attribs[] = s.getAttributes(map);
                        // create the SQLInput "stream"
                        SQLInputImpl sqlInput = new SQLInputImpl(attribs, map);
                        // read the values...
                        obj.readSQL(sqlInput, s.getSQLTypeName());
                        rsval = obj;
                    }
                } else if (rsval instanceof SQLData) {
View Full Code Here

TOP

Related Classes of javax.sql.rowset.serial.SQLInputImpl

Copyright © 2018 www.massapicom. 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.