big newbie with Java, i wish to read data received from a remote
server in http.
process :
1/ post data to url
2/ read data return by remote host
3/ display HTML code received
At this time, I manage to received the output stream, but when I make
a println it gives me compiled-lake characters...
Here is part of the code :
byte[] docInter = new byte[200000];
int antiLoop=0;
java.io.InputStream ip = conn.getInputStream();
while (ip.available()>0){
ip.read(docInter);
antiLoop++;
if(antiLoop> 1000){break;}
}
System.out.println("Received message from remote host : " +
docInter, true);
and this returns :
received message from remote host : [B@648e1b
instead of :
<HTML>
<HEAD>
<TITLE>
xxxxx
</TITLE>
</HEAD>
<BODY>
Your Message has been stored
<BR>
</BODY>
</HTML>