Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 09-07-2005, 12:19 PM   #1 (permalink)
j.gohel
Code Monkey
 
Join Date: Apr 2005
Posts: 68
j.gohel is on a distinguished road
Reading chunks of data in a servlet???

Hello,

I have some data in a file which i have read in a byte array.

Now i am sending the data from that bytes array into small chunks say if file size is of 8443 KB then first i am sending the 8000 KB into chunks of 2000 KB & the remaining after writing that 8000 KB on the outputstream.

Now i am trying to read that small chunks of data into my servlet,it is throwing an exception:
java.net.SocketTimeoutException: Read timed out

So how should i read that data so that when the data is sent in small chunks it gets perfectly received .

Thanking you,
Jignesh
j.gohel is offline   Reply With Quote
Old 09-09-2005, 12:36 PM   #2 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,139
Belisarius is on a distinguished road
As I understand it (and I might be underestimating the versatility of Servlets), they read HTTP data. It sounds, however, like you are sending raw TCP data to it, which seems like trying to fit a square peg into a round hole . . . perhaps you could clarify your situation a bit more?
__________________
GitS
Belisarius is offline   Reply With Quote
Old 09-10-2005, 01:40 PM   #3 (permalink)
technobard
Centurion Nova Prime
 
technobard's Avatar
 
Join Date: May 2002
Location: Oak Park, IL (USA)
Posts: 285
technobard is on a distinguished road
Quote:
Originally Posted by Belisarius
perhaps you could clarify your situation a bit more?
And maybe provide some code.
__________________
It takes 2 points to draw a straight line, but at least 3 points to draw a conclusion.
technobard is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
File Reading! Salchester Standard C, C++ 4 08-20-2005 01:03 PM
? About data types... slashdot Standard C, C++ 2 04-15-2005 09:57 AM
Delphi, Reading In Data! dazzdave All Other Coding Languages 3 03-22-2005 03:35 PM
Error java.net.ProtocolException: Cannot write output after reading input. wishknew Java 4 03-07-2005 04:01 PM
Would this data be of use too you? SiteTutor Lounge 3 08-02-2002 05:58 AM


All times are GMT -8. The time now is 01:48 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting