六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 78|回复: 0

j2me 联网技术分析总结

[复制链接]

升级  28.67%

27

主题

27

主题

27

主题

秀才

Rank: 2

积分
93
 楼主| 发表于 2013-1-27 04:43:12 | 显示全部楼层 |阅读模式
基本点:
Generic Connections
In the CLDC Generic Connection framework, all connections are created usingthe open static method from the Connector class. Ifsuccessful, this method returns an object that implements one of the genericconnection interfaces. Figure 1 shows how these interfaces form an is-ahierarchy. The Connection interface is the base interface suchthat StreamConnectionNotifier is a Connection andInputConnection is a Connection too.

Figure 1: Connection interface hierarchy
       
  • The Connection interface is the most basic connection type. It    can only be opened and closed.   
  • The InputConnection interface represents a device from which    data can be    read. Its openInputStream method returns an input stream for the    connection.   
  • The OuputConnection interface represents a device to which data    can be    written. Its openOutputStream method returns an output stream for    the connection.   
  • The StreamConnection interface combines the input and output    connections.   
  • The ContentConnection is a subinterface of    StreamConnection. It    provides access to some of the basic meta data information provided by HTTP    connections.   
  • The StreamConnectionNotified waits for a connection to be    established.    It returns a StreamConnection on which a communication link has ben    established.   
  • The DatagramConnection represents a datagram endpoint.
The open method of the Connector class has thefollowing syntax, where the String parameter has the format"protocol:address;parameters".
<div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!---->Connector.open(String);
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表