title: convert string to oracle.sql.clob in java?
body: <p>I'm coding a Java function inside Oracle Database which produce allot of text!
  how to convert a string to CLOB (oracle.sql.CLOB) in java?
  what is the straight-forward way to do?</p>
  
  <p>I'm trying to build a function which has <strong>String</strong> as an input with <strong>oracle.sql.CLOB</strong> as an output, but it's not working! I'm not doing any <strong>jdbc</strong> related work!</p>
  
  <p>here is what I have (which is not working!)</p>
  
  <pre><code>  public static CLOB str2clob(String s)
    {
           oracle.sql.CLOB clob = null;
  
           try
           {
                 clob.setString(0,s);
  
           } catch (Exception e)
           {
           }
           return clob;
    }
  </code></pre>