struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From B.Sridhar <bsridh...@gmail.com>
Subject Re: [OT] Re: java.lang.OutOfMemoryError: Java heap space
Date Tue, 24 Oct 2006 05:44:47 GMT
Hi,
thanks for ur suggestion, i have used commons.IOutil and its working!
bye

On 10/20/06, Antonio Petrelli <apetrelli@apache.org> wrote:
>
> B.Sridhar ha scritto:
> > yes .  actually my appln initially downloads the file from database to a
> > temp directory of the tomcat as a temp file and then from there iam
> > reading
> > it to display.  So the file is not getting stored in the temp directory.
> > while getting the file from database its displaying exception
> >
> > On 10/20/06, Antonio Petrelli <apetrelli@apache.org> wrote:
> >> You haven't your 85MB file in your memory, right?
>
> Oh, boy, so if you have 1 GB of a file, you want to store it ALL in
> memory?
> If you want to put your file in a temp directory, read it in chunks
> (e.g. 1kB at a time) and write it in chunks.
> You can also use Commons IO, in particular IOUtils.copy:
>
> http://jakarta.apache.org/commons/io/api-release/org/apache/commons/io/IOUtils.html#copy(java.io.InputStream,%20java.io.OutputStream)
>
> HTH
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
B.Sridhar

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message