commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ortwin Glück <ortwin.glu...@nose.ch>
Subject Re: HttpClient -- possible resource leak?
Date Wed, 09 Jun 2004 14:55:01 GMT


Michael Mastroianni wrote:
>                                     responseBody = method.getResponseBodyAsString();
>                                     
>                                     java.io.FileWriter fw = new java.io.FileWriter(m_sPath
+ "\\" + m_sFile);
>                                     fw.write(responseBody);


Can you try and use a stream instead of a string? You need to take care 
of the encoding then, but you would avoid any buffering in memory.

-- 
  _________________________________________________________________
  NOSE applied intelligence ag

  ortwin glück                      [www]      http://www.nose.ch
  software engineer
  hardturmstrasse 171               [pgp id]           0x81CF3416
  8005 zürich                       [office]      +41-1-277 57 35
  switzerland                       [fax]         +41-1-277 57 12

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message