Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
* large enough binary type will work.
*
* @author Juergen Hoeller
* @since 1.1.5
* @see org.springframework.orm.ibatis.SqlMapClientFactoryBean#setLobHandler
* @since 1.1.5
*/
@Slf4j
@SuppressWarnings("deprecation")
Expand Down Expand Up @@ -71,35 +71,26 @@ protected void setParameterInternal(
}


@Override
protected Object getResultInternal(ResultSet rs, int index, LobHandler lobHandler)
throws SQLException {

StringBuffer read_data = new StringBuffer("");
int read_length;
@Override
protected Object getResultInternal(ResultSet rs, int index, LobHandler lobHandler)
throws SQLException {

char [] buf = new char[1024];
char[] buf = new char[1024];
StringBuilder readData = new StringBuilder(buf.length);

Reader rd = lobHandler.getClobAsCharacterStream(rs, index);
try {
while( (read_length=rd.read(buf)) != -1) {
read_data.append(buf, 0, read_length);
}
} catch (IOException ie) {
log.debug("ie: {}", ie);//SQLException sqle = new SQLException(ie.getMessage());
//throw sqle;
// 2011.10.10 보안점검 후속조치
} finally {

try {
rd.close();
} catch (IOException ignore) {
log.debug("IGNORE: {}", ignore.getMessage());
}

}
Reader rd = lobHandler.getClobAsCharacterStream(rs, index);
int readLength;
try (Reader r = rd) {
while ((readLength = r.read(buf)) != -1) {
readData.append(buf, 0, readLength);
}
} catch (IOException ie) {
log.debug("ie: {}", ie);//SQLException sqle = new SQLException(ie.getMessage());
//throw sqle;
// 2011.10.10 보안점검 후속조치
}
return readData.toString();

return read_data.toString();

//return lobHandler.getClobAsString(rs, index);
}
Expand Down