Network Connection (Cont.)


HTTP/1.0 allows an open-ended set of methods to be used to indicate the purpose of a request: And likewise, you can set some of the HTTP properties. The HTTP User-Agent (or browser ID) request header contains information about compatibility, the browser, and the platform name. For example,
   c.setRequestProperty( "User-Agent",
     "Profile/MIDP-1.0 Configuration/CLDC-1.0" );
If there is a method that requires data to be sent or received from the server, there is a state transition from Setup to Connected. Examples of methods that cause the transition include:

   openInputStream
   openOutputStream
   openDataInputStream
   openDataOutputStream
   

   getLength
   getType
   getDate
   getExpiration
   
While the connection is open, some of these methods that may be invoked:

   getURL
   getProtocol
   
   getHost
   getPort