wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes file upload functionality in Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "file upload functionality in Java" Watch "file upload functionality in Java" New topic
Author

file upload functionality in Java

PraveenKumar Kannankutty
Greenhorn

Joined: Aug 02, 2005
Posts: 13
Hi,

Iam using the following piece of code for implementing a file upload functionality. Iam able to upload an image of size 250Mb using the following code using fileInputStream and OutputStream.

byte[] buffer = new byte[8192];
while((bytesRead = stream.read(buffer,0,8192))!= -1)
{
fileOutputStream.write(buffer,0,bytesRead);
}

But the same code doesnt holds good when I try to upload an image file o 500MB.

Can any suggests me a solution to fix this issue?

Thanks in Advance
Praveen.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

"Doesn't holds good" in what way? What happens?

You've only shown us one end of the connection -- what's happening at the other end?


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: file upload functionality in Java