专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > BlackBerry

帮忙解决黑莓蓝牙模块的函数的疑义。十分感谢

发布时间:2010-05-30 19:36:31 文章来源:www.iduyao.cn 采编人员:星星草
帮忙解决黑莓蓝牙模块的函数的疑问。十分感谢。
看不懂代码:

代码一:

 type = _din.readInt(); // Type of operation to enact
                    //不能理解
                    if (type == INSERT) 
                    {
                        // Insert the selected text at the specified position.
                        offset = _din.readInt();
                        value = _din.readUTF();
                        insert(value, offset);
                    }
                    else if (type == REMOVE) 
                    {
                        // Remove characters at specified position
                        offset = _din.readInt();
                        count = _din.readInt();
                        remove(offset, count);
                    } 



其中 _din如下定义
                _bluetoothConnection = (StreamConnection)Connector.open( info[FIRST].toString(), Connector.READ_WRITE );
                
                _din = _bluetoothConnection.openDataInputStream();
                _dout = _bluetoothConnection.openDataOutputStream();


readInt的文档解释如下:
public final int readInt()
                  throws IOException
See the general contract of the readInt method of DataInput. 
Bytes for this operation are read from the contained input stream. 

Specified by:
readInt in interface DataInput
Returns:
the next four bytes of this input stream, interpreted as an int. 
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: