String s = "";
String l = "";
String wh = condition != "" ? condition : "(1=1)";
String sql = "select " + col + " from " + tablename + " where " + wh;
pstmt=conn.prepareStatement(sql);
ResultSet rs=pstmt.executeQuery() ;
if(rs.next())
{
InputStream input = rs.getBinaryStream(1);
BufferedReader BR = new BufferedReader(new InputStreamReader(input));
while ( (s = BR.readLine()) != null) {
l = l + s;
}
}
con = new String(con.getBytes("GB2312"), "ISO8859_1");
int fileLength =con.length();
StringBufferInputStream fin=new StringBufferInputStream(con);
java.sql.PreparedStatement pstmt=conn.prepareStatement("update incontent set con_blob=? where con_id='"+con_id+"'");
pstmt.setBinaryStream(1,fin,fileLength);
pstmt.executeUpdate();