Java SQL Clob getRSClob(Object obj, String def)

Here you can find the source of getRSClob(Object obj, String def)

Description

get RS Clob

License

Apache License

Declaration

static public String getRSClob(Object obj, String def) throws java.sql.SQLException 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    static public String getRSClob(Object obj) throws java.sql.SQLException {
        return getRSClob(obj, null);
    }/*from w ww .j  av  a  2 s .c om*/

    static public String getRSClob(Object obj, String def) throws java.sql.SQLException {
        if (obj == null)
            return def;
        if (obj instanceof java.sql.Clob)
            return ((java.sql.Clob) obj).getSubString((long) 1, (int) ((java.sql.Clob) obj).length());
        System.out.println("end of getRSClob, wrong object: " + obj.getClass().getName());
        return def;
    }
}

Related

  1. convertClob2String(Clob clob)
  2. ConvertClobToString(StringBuffer sb, Clob clob)
  3. convertToString(Object obj)
  4. getClobToString(Clob clob)
  5. getFormattedClobColumn(final InputStream is)
  6. getString(Clob c)
  7. getStringFromClob(Clob clob)
  8. isNClob(final Class type)
  9. parseToString(Clob clob)