StringBuilder buf = new StringBuilder(1000);
StringBuffer buf = new StringBuffer(1000);
    private void printHistoryRecords(List history, OutputStreamWriter osw)            throws IOException    {        Iterator iter = history.iterator();        while (iter.hasNext())        {            ChecksumHistory historyInfo = (ChecksumHistory) iter.next();            StringBuilder buf = new StringBuilder(1000);            buf.append("------------------------------------------------ \n");            buf.append(msg("bitstream-id")).append(" = ").append(                    historyInfo.getBitstreamId()).append("\n");            buf.append(msg("process-start-date")).append(" = ").append(                    DATE_FORMAT_MAX.format(historyInfo.getProcessStartDate()))                    .append("\n");            buf.append(msg("process-end-date")).append(" = ").append(                    DATE_FORMAT_MAX.format(historyInfo.getProcessEndDate()))                    .append("\n");            buf.append(msg("checksum-expected")).append(" = ").append(                    historyInfo.getChecksumExpected()).append("\n");            buf.append(msg("checksum-calculated")).append(" = ").append(                    historyInfo.getChecksumCalculated()).append("\n");            buf.append(msg("result")).append(" = ").append(                    historyInfo.getResult()).append("\n");            buf.append("----------------------------------------------- \n\n");            osw.write(buf.toString());        }    }