This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
If you are going to post more than a line or two of your code, wrap that code in a set of UBB Code tags. Doing so will help to preserve your code's indenting, making it easier to read. If it is easier to read, more people will actaully read it and you will stand a better chance of getting help with your question. See UseCodeTags for more help with UBB code tags.
Originally posted by dmay chug: I use following code for transfering file to client machine. ...................................
I want to enhance that code so that it not execute fast and not consume much memory. Thanks
[ October 07, 2006: Message edited by: Ben Souther ]
What happens it the length is too big and the jvm is not able to create such a large byte array.This might happend while sending a large file.In that case you can choose to create a array of some size (say 1024) and then read 1024 bytes from stream to this array and then write this byte array to the outputstream untill all the bytes from the inputstream is not read.