@@ -0,0 +1,1288 @@
+/*%0A * To change this template, choose Tools %7C Templates%0A * and open the template in the editor.%0A */%0Apackage org.imirsel.nema.meandre.util;%0A%0Aimport java.io.BufferedWriter;%0Aimport java.io.IOException;%0Aimport java.sql.ResultSet;%0Aimport java.sql.SQLException;%0A%0Aimport org.apache.commons.logging.Log;%0Aimport org.apache.commons.logging.LogFactory;%0A%0Aimport org.springframework.jdbc.core.JdbcTemplate;%0Aimport org.springframework.jdbc.core.RowCallbackHandler;%0A%0A/**%0A * Call Back implementation of %7B@link org.springframework.jdbc.core.JdbcTemplate%7D to write every row into a %7B@link BufferedWriter%7D%0A * @since 0.9%0A * @author gzhu1%0A */%0Apublic class ConsoleRowHandler implements RowCallbackHandler %7B%0A%0A    static protected Log logger = LogFactory.getLog(ConsoleRowHandler.class);%0A    private BufferedWriter writer;%0A%0A    /**%0A     * @param writer the writer to set%0A     */%0A    public void setWriter(BufferedWriter writer) %7B%0A        this.writer = writer;%0A    %7D%0A%0A    public void processRow(ResultSet rs) throws SQLException %7B%0A        try %7B%0A            writer.append(%22%5B%22).append(rs.getString(%22print%22)).append(%22%5D%22);%0A            writer.newLine();%0A            writer.append(rs.getString(%22ts%22));%0A            writer.newLine();%0A        %7D catch (IOException ex) %7B%0A            logger.error(ex,ex);%0A        %7D%0A%0A    %7D%0A%7D%0A

use row callback for large meandre console log