Results 1 to 3 of 3
- 08-07-2012, 08:36 PM #1
Member
- Join Date
- Aug 2012
- Posts
- 1
- Rep Power
- 0
reading unformatted data(i.e that string do not having line termination characters)
I have a server socket application which listens on particular ip and port. Then I have client socket which reads input from server and give response.
But my problem is that server do not formatted line termination characters at the end. so when i use buffered reader readline method it hangs. so how should i read the data send by server.
here server is basically a API(METER).
Thanks in advance.
Please reply at earliest.
I am also enclosing herewith sample request /response between server and client.
Request: 8/2/2012 3:28:24 PM.60764 (+0.0000 seconds)
53 0D S.
Answer: 8/2/2012 3:28:24 PM.87364 (+0.2656 seconds)
53 50 31 39 35 30 34 37 38 34 0D SP19504784.
Request: 8/2/2012 3:28:24 PM.92064 (+0.0000 seconds)
53 48 0D SH.
Answer: 8/2/2012 3:28:24 PM.02964 (+0.1094 seconds)
53 48 0D SH.
Request: 8/2/2012 3:28:26 PM.81164 (+0.0000 seconds)
CA F0 00 00 00 00 00 00 00 3A Êð.......:
Answer: 8/2/2012 3:28:26 PM.02964 (+0.2188 seconds)
C4 00 05 00 C9 31 36 38 C4 B7 B7 3F 2E C9 74 5A Ä...É168Ä··?.ÉtZ
02 00 02 00 FE FC C9 A1 0D 07 00 FB FF FD FC C9 ....þüÉ¡...ûÿýüÉ
1E 0E FD FF FE FF FD FC C9 B8 FE 4E FF FA 01 FF ..ýÿþÿýüɸþNÿú.ÿhttp://www.java-forums.org/images/sm...pe/(shake).gif
FF B9 D0 F9 F0 3F D0 BF 50 9F ÿ¹Ðùð?пP?
- 08-07-2012, 09:02 PM #2
Re: reading unformatted data(i.e that string do not having line termination character
Also posted at reading unformatted data from socket
If you don't understand my response, don't ignore it, ask a question.
- 08-08-2012, 05:30 AM #3
Re: reading unformatted data(i.e that string do not having line termination character
Also cross posted and already answered at reading unformatted data from socket in java - Stack Overflow
I'm closing this thread so that members here won't have to waste their time.
db
THREAD CLOSEDWhy do they call it rush hour when nothing moves? - Robin Williams
Similar Threads
-
Reading characters into a string
By Teclis in forum New To JavaReplies: 2Last Post: 03-08-2011, 10:08 PM -
How to read file line by line with fixed number of characters
By trkece in forum New To JavaReplies: 1Last Post: 02-13-2011, 03:09 PM -
Reading in a line of data and splitting the line up into variables
By guru32 in forum New To JavaReplies: 9Last Post: 04-07-2009, 03:51 AM -
Reading in data from file line by line
By bluekswing in forum New To JavaReplies: 1Last Post: 10-02-2007, 12:19 AM


1Likes
LinkBack URL
About LinkBacks

Bookmarks