package com.android.bluetooth.opp;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import android.bluetooth.BluetoothSocket;
import javax.obex.ObexTransport;
public class BluetoothOppRfcommTransport implements ObexTransport {
private final BluetoothSocket mSocket;
public BluetoothOppRfcommTransport(BluetoothSocket socket) {
super();
this.mSocket = socket;
}
public void close() throws IOException {
mSocket.close();
}
public DataInputStream openDataInputStream() throws IOException {
return new DataInputStream(openInputStream());
}
public DataOutputStream openDataOutputStream() throws IOException {
return new DataOutputStream(openOutputStream());
}
public InputStream openInputStream() throws IOException {
return mSocket.getInputStream();
}
public OutputStream openOutputStream() throws IOException {
return mSocket.getOutputStream();
}
public void connect() throws IOException {
}
public void create() throws IOException {
}
public void disconnect() throws IOException {
}
public void listen() throws IOException {
}
public boolean isConnected() throws IOException {
//return mSocket.isConnected();
// TODO: add implementation
return true;
}
public String getRemoteAddress() {
if (mSocket == null)
return null;
return mSocket.getRemoteDevice().getAddress();
}
}
DSAParams.rar_Dsa interface_dsa
版权申诉
111 浏览量
2022-09-24
06:23:16
上传
评论
收藏 848B RAR 举报
邓凌佳
- 粉丝: 65
- 资源: 1万+
最新资源
- 微信小程序 - 同乐居商城:购物车合算源码
- 1、根据输入的三条边值判断能组成何种三角形,并设计测试数据进行判定覆盖测试 三条边为变量a、b、c,范围为1≤边值≤10,不在范
- SQL server 练习题目8道(小白教学).zip
- Python 手写实现 iD3 决策树算法-根据信息增益公式.zip
- 411675952289057车联助手-小窗版(三星)3.5.1.apk
- 三种快速排序方法合并在一个文件中以便直接运行的Python代码示例
- 937712277954201实习5.word
- 2程序语言基础知识pdf1_1716337722703.jpeg
- 简单的Python示例,演示了如何使用TCP/IP协议进行基本的客户端和服务器通信
- 考试.sql
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈