Here you can find the source of getStringChunks(ResultSet rs, int colIndex, StringBuffer buf)
public static void getStringChunks(ResultSet rs, int colIndex, StringBuffer buf)
//package com.java2s; //License from project: Apache License import java.io.Reader; import java.sql.ResultSet; public class Main { public static void getStringChunks(ResultSet rs, int colIndex, StringBuffer buf) {/* ww w .j a v a2s . c o m*/ char[] buffer = new char[1024000]; int charRead = 0; try { Reader input = rs.getCharacterStream(colIndex); while ((input != null) && ((charRead = input.read(buffer)) != -1)) { buf.append(buffer, 0, charRead); } } catch (Exception e) { e.printStackTrace(); } } }