title: ResultSet How to get String from an object when data is null?
body: <p>In my Oracle table there are columns with different type.<br>
  I want to read all columns as number. </p>
  
  <pre><code>String str = resultSet.getString("col1");
  </code></pre>
  
  <p>The problem is that if column in database is defined as number, and value is </p>
  
  <blockquote>
    <p>0.5</p>
  </blockquote>
  
  <p>the returned string will be </p>
  
  <blockquote>
    <p>.5  </p>
  </blockquote>
  
  <p><br />
  I can not use any other getter like <em>getDecimal()</em> and etc.</p>
  
  <p>If I use:</p>
  
  <pre><code>String str = resultSet.getObject("col1").toString(); 
  </code></pre>
  
  <p>I'll get an exception if the value is null.</p>