Slide 5.1: Network connection
  Slide 5.3: Network connection (cont.)
  Home


Network Connection (Cont.)

The open method of the Connector class has the following syntax, where the String parameter has the format "protocol:address;parameters".
   Connector.open(String);
Below are few examples:

HTTP connection: Connector.open("http://java.sun.com/developer");

Datagram connection: Connector.open("datagram://address:port#");

Communicate with a port: Connector.open("comm:0;baudrate=9600');

Open files: Connector.open("file:/myFile.txt");