Problem with renderBinary(InputStream)
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
play framework | Status tracked in 1.0 | |||||
1.0 |
Fix Released
|
Undecided
|
Guillaume Bort | |||
1.1 |
Fix Committed
|
Undecided
|
Guillaume Bort |
Bug Description
Problem with renderBinary(
http://
David
##############
I have a problem with renderBinary when streaming a big file using
InputStream as parametr. renderBinary is working fine when streaming
the file directly but fails when streaming InputStream.
FileInputStream file= new FileInputStream
File file2= new File("c:
renderBinary(file); // cause error
renderBinary(
The error I get is:
Oops: OutOfMemoryError
An unexpected error occured caused by exception OutOfMemoryError:
Java heap space
To be honest I found the problem when using MongoDB and its GridFS.
GridFS return files as objects that provide .getInputStream() . I just
checked using the sample above, if its GridFS problem or Play! The
same thing but in diferent way is, that GridFS has method that can
stream the file to OutputStream so I tried to stream to Play!'s
'response.out' , but it has the same error result. But looking to file
example above shows its rather the Play! specific problem.
Changed in play: | |
status: | New → Fix Committed |
Changed in play: | |
milestone: | none → 1.0.1 |
milestone: | 1.0.1 → none |