Results 1 to 4 of 4
- 12-20-2008, 08:31 AM #1
Member
- Join Date
- Dec 2008
- Posts
- 12
- Rep Power
- 0
saving bytes received in different request
Hi All,
Im new to forum and to java . Im devloping an application that uses HttpServlet for receiving request from mobile device.
Im uploading an image from mobile to server and saving it on server.
I am accepting one chunk in one request and saving it locally.
But i dont know how to save second chunk along with first. Means append next to previous.
Please need help. If any body knows please tell me.
If any can give code snippet then it will be great
- 12-20-2008, 08:33 PM #2
Duplicate post. Doing this discourages folks from being helpful
- 12-22-2008, 11:29 AM #3
Member
- Join Date
- Dec 2008
- Posts
- 12
- Rep Power
- 0
Saving bytes received in different request
Hi,
Sorry for duplicate post. But I searched forum and i did not get anything regarding this. So, I posted it.
If you know any link or post regarding this then please let me know.
I need help coz im in very bad situation.
Thanks.
- 12-23-2008, 07:44 PM #4
Basically, what you need to do is save each chunk, and, when you have received all the chunks, you then retrieve them and process them.
If this is a small app on a single instance Web server, you can use a class with a static method to hold the chunks in a static HashMap. Be sure to synchronize! However, this will *not* work on a Web server farm.
You can also store the chunks in a database. That's a little more effort, but it will always work.
I suggest starting with the first approach as a prototype. Once the process works, use the database.
Similar Threads
-
saving bytes received in different request
By renuka_anil in forum Java ServletReplies: 18Last Post: 12-26-2008, 12:12 PM -
How can you get the exact size of a file in bytes.
By J-Live in forum New To JavaReplies: 7Last Post: 10-28-2008, 01:41 PM -
midi bytes
By willemjav in forum Advanced JavaReplies: 77Last Post: 07-29-2008, 03:10 PM -
Reading bytes from InputStream
By Java Tip in forum Java TipReplies: 0Last Post: 11-25-2007, 07:51 PM -
how to know the number of bytes
By gabriel in forum New To JavaReplies: 2Last Post: 08-06-2007, 05:13 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks