Slide 5.5: Fetching a page using a StreamConnection Slide 5.7: Fetching a page using an HttpConnection Home |
StreamConnection
(Cont.)
StreamConnection c = null;
InputStream s = null;
StringBuffer b = new StringBuffer( );
c = (StreamConnection) Connector.open( url );
Connection
, where the parameter name
is the URL for the connection.
s = c.openInputStream( );
System.out.println( b.toString( ) );