This content has been marked as final. Show 2 replies
StreamConnection connection = (StreamConnection) Connector.open("socket://www.myserver.com:80");
PrintStream output =
new PrintStream(connection.openOutputStream() );
output.println( "GET /my.html HTTP/0.9\n\n" );
InputStream in = connection.openInputStream();
while( ( ch = in.read() ) != -1 )
System.out.print( (char) ch );
Moderator advice: Please read the announcements at the top of the forum listing and the forums FAQ linked from every page. They are there for a purpose.
Then edit your post and format the code correctly.