Java Code Examples for java.sql.PreparedStatement#setUnicodeStream()
The following examples show how to use
java.sql.PreparedStatement#setUnicodeStream() .
These examples are extracted from open source projects.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: sharding-jdbc-1.5.1 File: PreparedStatementAdapterTest.java License: Apache License 2.0 | 5 votes |
@SuppressWarnings("deprecation") @Test public void assertSetUnicodeStream() throws SQLException, IOException { for (PreparedStatement each : preparedStatements) { try (InputStream inputStream = new ByteArrayInputStream(new byte[]{})) { each.setUnicodeStream(1, inputStream, 100); assertParameter(each, 1, inputStream); } } }
Example 2
Source Project: shardingsphere File: PreparedStatementAdapterTest.java License: Apache License 2.0 | 5 votes |
@SuppressWarnings("deprecation") @Test public void assertSetUnicodeStream() throws SQLException, IOException { for (PreparedStatement each : preparedStatements) { try (InputStream inputStream = new ByteArrayInputStream(new byte[]{})) { each.setUnicodeStream(1, inputStream, 100); assertParameter(each, 1, inputStream); } } }
Example 3
Source Project: Oceanus File: PreparedStatementWrapper.java License: Apache License 2.0 | 5 votes |
@Override public void setUnicodeStream(final int parameterIndex, final InputStream x, final int length) throws SQLException { ParameterCallback callback = new ParameterCallbackAction( parameterIndex, x) { @SuppressWarnings("deprecation") @Override public void call(PreparedStatement preparedStatement) throws SQLException { preparedStatement.setUnicodeStream(parameterIndex(), (InputStream)getParameter(), length); } }; addParameterCallback(callback); }
Example 4
Source Project: Zebra File: UnicodeStreamParamContext.java License: Apache License 2.0 | 4 votes |
@SuppressWarnings("deprecation") @Override public void setParam(PreparedStatement stmt) throws SQLException { stmt.setUnicodeStream(index, (InputStream) values[0], (Integer) values[1]); }