btconnection.java

来自「专业汽车级嵌入式操作系统OSEK的源代码」· Java 代码 · 共 52 行

JAVA
52
字号
package lejos.nxt.comm;import java.io.*;import javax.microedition.io.*;/** *  * Represents a Bluetooth Stream Connection. *  * Currently only used to close a Bluetooth connection, * but will be used in a later release to implement input * and output streams. * */public class BTConnection implements StreamConnection {	int handle;	boolean open;		BTConnection(int handle)	{		this.handle = handle;		open = true;	}	public void close() throws IOException {		Bluetooth.btSetCmdMode(1);		open = false;	}	public DataInputStream openDataInputStream() throws IOException {		// TODO Auto-generated method stub		return null;	}	public DataOutputStream openDataOutputStream() throws IOException {		// TODO Auto-generated method stub		return null;	}	public InputStream openInputStream() throws IOException {		// TODO Auto-generated method stub		return null;	}	public OutputStream openOutputStream() throws IOException {		// TODO Auto-generated method stub		return null;	}}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?