code: public static OutputStream getOutputStreamFromBlob(ResultSet res, String name) throws SQLException {
  
          Blob blob = res.getBlob(name);
          blob.truncate(0);
          return blob.setBinaryStream(0L);
      }
docs: Generates an Output stream that writes to a blob, also truncating the existing blob if required.<p>
  
  Apparently Oracle requires some non-standard handling here.<p>
  
  @param res the result set where the blob is located in
  @param name the name of the database column where the blob is located
  @return an Output stream from a blob
  @throws SQLException if something goes wring