static void putToDb(Connection conn,Object key,Object val) throws SQLException {
  PreparedStatement stmt=null;
  try {
    stmt=conn.prepareStatement(H2CacheStore.MERGE);
    stmt.setBinaryStream(1,new ByteArrayInputStream(H2CacheStore.serialize(key)));
    stmt.setBinaryStream(2,new ByteArrayInputStream(H2CacheStore.serialize(val)));
    stmt.executeUpdate();
  }
  finally {
    U.closeQuiet(stmt);
  }
}

static void putToDb ( Connection conn , Object key , Object val ) throws SQLException { PreparedStatement stmt = null ; try { stmt = conn . prepareStatement ( H2CacheStore . MERGE ) ; stmt . setBinaryStream ( 1 , new ByteArrayInputStream ( H2CacheStore . serialize ( key ) ) ) ; stmt . setBinaryStream ( 2 , new ByteArrayInputStream ( H2CacheStore . serialize ( val ) ) ) ; stmt . executeUpdate ( ) ; } finally { U . closeQuiet ( stmt ) ; } }
puts key - value pair to h2 .
