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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to