List of utility methods to do SQL ResultSet Clob Read
String | getClobAsString(ResultSet rs, String name, String ifnull) get Clob As String String strClob = null; Clob clob = rs.getClob(name); if (clob != null) strClob = clobToString(clob, ifnull); return strClob; |
String | getCLOBContent(ResultSet rs, int clobidx) Gets the cLOB content. Clob clobField = null; String content = ""; int count = 0; char buffer[] = new char[4086]; clobField = rs.getClob(clobidx); if (clobField != null) { Reader reader = clobField.getCharacterStream(); while ((count = reader.read(buffer)) > 0) { ... |
String | getOracleClob(ResultSet p_rset, int p_col) static method for fetching an Oracle CLOB value if (p_rset == null) { Logger.getAnonymousLogger().severe("NULL ResultSet detected"); return ""; try { Clob v_clob = p_rset.getClob(p_col); if (v_clob != null) { Reader v_stream; ... |
String | readClobUTF16BinaryStream(ResultSet rs, String fieldName) read clob into a string Clob clob = rs.getClob(fieldName); Reader clobStream = clob.getCharacterStream(); StringBuffer clobData = new StringBuffer(); int nchars = 0; char[] buffer = new char[4096]; while ((nchars = clobStream.read(buffer)) != -1) clobData.append(buffer, 0, nchars); clobStream.close(); ... |