package tests.reference; import java.sql.*; public class RefBlobTest { public static void main(String[] args) throws Exception { String table = args[0], payload = args[1]; Class.forName("com.informix.jdbc.IfxDriver"); try (Connection c = DriverManager.getConnection( "jdbc:informix-sqli://127.0.0.1:9088/testdb:INFORMIXSERVER=informix", "informix", "in4mix")) { c.setAutoCommit(true); try (Statement s = c.createStatement()) { s.execute("CREATE TABLE " + table + " (id INT, data BLOB)"); } try (PreparedStatement ps = c.prepareStatement( "INSERT INTO " + table + " VALUES (?, ?)")) { ps.setInt(1, 1); ps.setBytes(2, payload.getBytes()); ps.executeUpdate(); } } } }