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

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -