From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4745 invoked by alias); 14 Aug 2007 17:12:16 -0000 Received: (qmail 4701 invoked by uid 22791); 14 Aug 2007 17:12:15 -0000 X-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,DK_POLICY_SIGNSOME,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 14 Aug 2007 17:12:06 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l7EHC4Cs009056 for ; Tue, 14 Aug 2007 13:12:04 -0400 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l7EHC3fH011902; Tue, 14 Aug 2007 13:12:03 -0400 Received: from toner.toronto.redhat.com (toner.toronto.redhat.com [172.16.14.55]) by pobox.toronto.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id l7EHC287015587; Tue, 14 Aug 2007 13:12:02 -0400 Message-ID: <46C1E262.7030104@redhat.com> Date: Tue, 14 Aug 2007 17:12:00 -0000 From: Sami Wagiaalla User-Agent: Thunderbird 2.0.0.5 (X11/20070719) MIME-Version: 1.0 To: Andrew Cagney CC: frysk@sourceware.org Subject: Re: toPrint vs toString References: <46C1C8E8.4060805@redhat.com> <46C1CBC3.4000308@redhat.com> In-Reply-To: <46C1CBC3.4000308@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact frysk-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: frysk-owner@sourceware.org X-SW-Source: 2007-q3/txt/msg00296.txt.bz2 Sami Wagiaalla wrote: > >> public void toPrint() >> stringWriter = new StringBuffer() >> printWriter = new PrintWriter(stringWriter) >> toPrint(printWriter) >> return stringWriter.toString(); > this should be stringWriter.getBuffer().toString(); > nm... I thought I was saving people from a trap I fell into but it looks like it works. my bad. Sami