java - safest way to read clob into xml parser -
i'm getting input stream clob in oracle 11 (using the oracle 11 jdbc driver), , passing input stream xml parser in java:
java.sql.clob clob = resultset.getclob("myclob"); inputstream = clob.getasciistream(); mydom dom = mydomparser.parse(is);
wondering if using characterstream safer? e.g instead:
reader r = clob.getcharacterstream(); mydom dom = mydomparser.parse(r);
my thinking getcharacterstream() might doing encoding helps guarantee nice utf-8 returned. not sure if there real difference between 2 ways shown here of reading clob.
not difference, getcharacterstream better unicode data. check link http://community.actian.com/wiki/manipulating_sql_clob_data_with_jdbc
Comments
Post a Comment