I am working on MML server, my Task is to read response from MML server. In this case, there is no "End of Response" Character in response. How would i know that that response is ended? Is there any kind of technique to get response length before reading the response. by doing this i want to break my while loop using the response length.
while(true)
{
try
{
char temp = (char) is.read();
System.out.println(temp);
responseLine = responseLine + temp;
}
catch(Throwable e)
{
e.printStackTrace();
break;
}
}
I don't know MML, but with streams in general, the ways to recognize end of a message are:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.