亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? remotedevice.java

?? java se平臺藍牙開發(fā)的插件 ,包括源碼 根據(jù)readme 生成包很多東西可以自己DIY很實用
?? JAVA
字號:
/* Copyright 2004 Intel Corporation This file is part of Blue Cove. Blue Cove is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. Blue Cove is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with Blue Cove; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */package javax.bluetooth;import java.io.IOException;import com.intel.bluetooth.BluetoothConnection;import com.intel.bluetooth.DebugLog;import com.intel.bluetooth.NotImplementedError;public class RemoteDevice {	private String name;	long address;	RemoteDevice(String name, long address) {		DebugLog.debug("new RemoteDevice", name);		this.name = name;		this.address = address;	}	/*	 * Creates a Bluetooth device based upon its address. The Bluetooth address	 * must be 12 hex characters long. Valid characters are 0-9, a-f, and A-F.	 * There is no preceding "0x" in the string. For example, valid Bluetooth	 * addresses include but are not limited to: 008037144297 00af8300cd0b	 * 014bd91DA8FC Parameters: address - the address of the Bluetooth device as	 * a 12 character hex string Throws: NullPointerException - if address is	 * null IllegalArgumentException - if address is the address of the local	 * device or is not a valid Bluetooth address	 */	protected RemoteDevice(String address) {		DebugLog.debug("new RemoteDevice", address);		this.address = Long.parseLong(address, 16);	}	/*	 * Determines if this is a trusted device according to the BCC. Returns:	 * true if the device is a trusted device, otherwise false	 */	public boolean isTrustedDevice() {		// TODO not yet implemented		return false;	}	/*	 * Returns the name of this device. The Bluetooth specification calls this	 * name the "Bluetooth device name" or the "user-friendly name". This method	 * will only contact the remote device if the name is not known or alwaysAsk	 * is true. Parameters: alwaysAsk - if true then the device will be	 * contacted for its name, otherwise, if there exists a known name for this	 * device, the name will be returned without contacting the remote device	 * Returns: the name of the device, or null if the Bluetooth system does not	 * support this feature; if the local device is able to contact the remote	 * device, the result will never be null; if the remote device does not have	 * a name then an empty string will be returned Throws: java.io.IOException -	 * if the remote device can not be contacted or the remote device could not	 * provide its name	 */	public String getFriendlyName(boolean alwaysAsk) throws IOException {		if (alwaysAsk || name == null || name.equals("")) {			name = LocalDevice.getLocalDevice().getBluetoothPeer().getpeername(					address);		}		return name;	}	/*	 * Retrieves the Bluetooth address of this device. The Bluetooth address	 * will be 12 characters long. Valid characters are 0-9 and A-F. This method	 * will never return null. Returns: the Bluetooth address of the remote	 * device	 */	public final String getBluetoothAddress() {		String s = Long.toHexString(address);		return "000000000000".substring(s.length()) + s;	}	/*	 * Determines if two RemoteDevices are equal. Two devices are equal if they	 * have the same Bluetooth device address. Overrides: equals in class	 * java.lang.Object Parameters: obj - the object to compare to Returns: true	 * if both devices have the same Bluetooth address; false if both devices do	 * not have the same address; false if obj is null; false if obj is not a	 * RemoteDevice	 */	public boolean equals(Object obj) {		return obj != null && obj instanceof RemoteDevice				&& ((RemoteDevice) obj).address == address;	}	/*	 * Computes the hash code for this object. This method will return the same	 * value when it is called multiple times on the same object. Overrides:	 * hashCode in class java.lang.Object Returns: the hash code for this object	 */	public int hashCode() {		return (int) address;	}	/*	 * Retrieves the Bluetooth device that is at the other end of the Bluetooth	 * Serial Port Profile connection, L2CAP connection, or OBEX over RFCOMM	 * connection provided. This method will never return null. Parameters: conn -	 * the Bluetooth Serial Port connection, L2CAP connection, or OBEX over	 * RFCOMM connection whose remote Bluetooth device is needed Returns: the	 * remote device involved in the connection Throws: IllegalArgumentException -	 * if conn is not a Bluetooth Serial Port Profile connection, L2CAP	 * connection, or OBEX over RFCOMM connection; if conn is a	 * L2CAPConnectionNotifier, StreamConnectionNotifier, or SessionNotifier	 * java.io.IOException - if the connection is closed NullPointerException -	 * if conn is null	 */	public static RemoteDevice getRemoteDevice(			javax.microedition.io.Connection conn) throws IOException {		// BluetoothPeer peer =		// (LocalDevice.getLocalDevice()).getBluetoothPeer();		if (!(conn instanceof BluetoothConnection))			throw new IllegalArgumentException("Not a Bluetooth connection");		return new RemoteDevice("", ((BluetoothConnection) conn)				.getRemoteAddress());	}	/*	 * Attempts to authenticate this RemoteDevice. Authentication is a means of	 * verifying the identity of a remote device. Authentication involves a	 * device-to-device challenge and response scheme that requires a 128-bit	 * common secret link key derived from a PIN code shared by both devices. If	 * either side's PIN code does not match, the authentication process fails	 * and the method returns false. The method will also return false if	 * authentication is incompatible with the current security settings of the	 * local device established by the BCC, if the stack does not support	 * authentication at all, or if the stack does not support authentication	 * subsequent to connection establishment. If this RemoteDevice has	 * previously been authenticated, then this method returns true without	 * attempting to re-authenticate this RemoteDevice.	 * 	 * Returns: true if authentication is successful; otherwise false Throws:	 * java.io.IOException - if there are no open connections between the local	 * device and this RemoteDevice	 */	/*	 * public boolean authenticate() throws IOException { }	 */	/*	 * Determines if this RemoteDevice should be allowed to continue to access	 * the local service provided by the Connection. In Bluetooth, authorization	 * is defined as the process of deciding if device X is allowed to access	 * service Y. The implementation of the authorize(Connection conn) method	 * asks the Bluetooth Control Center (BCC) to decide if it is acceptable for	 * RemoteDevice to continue to access a local service over the connection	 * conn. In devices with a user interface, the BCC is expected to consult	 * with the user to obtain approval. Some Bluetooth systems may allow the	 * user to permanently authorize a remote device for all local services.	 * When a device is authorized in this way, it is known as a "trusted	 * device" -- see isTrustedDevice().	 * 	 * The authorize() method will also check that the identity of the	 * RemoteDevice can be verified through authentication. If this RemoteDevice	 * has been authorized for conn previously, then this method returns true	 * without attempting to re-authorize this RemoteDevice.	 * 	 * Parameters: conn - the connection that this RemoteDevice is using to	 * access a local service Returns: true if this RemoteDevice is successfully	 * authenticated and authorized, otherwise false if authentication or	 * authorization fails Throws: IllegalArgumentException - if conn is not a	 * connection to this RemoteDevice, or if the local device initiated the	 * connection, i.e., the local device is the client rather than the server.	 * This exception is also thrown if conn was created by RemoteDevice using a	 * scheme other than btspp, btl2cap, or btgoep. This exception is thrown if	 * conn is a notifier used by a server to wait for a client connection,	 * since the notifier is not a connection to this RemoteDevice.	 * java.io.IOException - if conn is closed See Also: isTrustedDevice()	 */	/*	 * public boolean authorize(javax.microedition.io.Connection conn) throws	 * IOException { }	 */	/*	 * Attempts to turn encryption on or off for an existing connection. In the	 * case where the parameter on is true, this method will first authenticate	 * this RemoteDevice if it has not already been authenticated. Then it will	 * attempt to turn on encryption. If the connection is already encrypted	 * then this method returns true. Otherwise, when the parameter on is true,	 * either: the method succeeds in turning on encryption for the connection	 * and returns true, or the method was unsuccessful in turning on encryption	 * and returns false. This could happen because the stack does not support	 * encryption or because encryption conflicts with the user's security	 * settings for the device. In the case where the parameter on is false,	 * there are again two possible outcomes:	 * 	 * encryption is turned off on the connection and true is returned, or	 * encryption is left on for the connection and false is returned.	 * Encryption may be left on following encrypt(conn, false) for a variety of	 * reasons. The user's current security settings for the device may require	 * encryption or the stack may not have a mechanism to turn off encryption.	 * Also, the BCC may have determined that encryption will be kept on for the	 * physical link to this RemoteDevice. The details of the BCC are	 * implementation dependent, but encryption might be left on because other	 * connections to the same device need encryption. (All of the connections	 * over the same physical link must be encrypted if any of them are	 * encrypted.) While attempting to turn encryption off may not succeed	 * immediately because other connections need encryption on, there may be a	 * delayed effect. At some point, all of the connections over this physical	 * link needing encryption could be closed or also have had the method	 * encrypt(conn, false) invoked for them. In this case, the BCC may turn off	 * encryption for all connections over this physical link. (The policy used	 * by the BCC is implementation dependent.) It is recommended that	 * applications do encrypt(conn, false) once they no longer need encryption	 * to allow the BCC to determine if it can reduce the overhead on	 * connections to this RemoteDevice.	 * 	 * The fact that encrypt(conn, false) may not succeed in turning off	 * encryption has very few consequences for applications. The stack handles	 * encryption and decryption, so the application does not have to do	 * anything different depending on whether the connection is still encrypted	 * or not.	 * 	 * Parameters: conn - the connection whose need for encryption has changed	 * on - true attempts to turn on encryption; false attempts to turn off	 * encryption Returns: true if the change succeeded, otherwise false if it	 * failed Throws: java.io.IOException - if conn is closed	 * IllegalArgumentException - if conn is not a connection to this	 * RemoteDevice; if conn was created by the client side of the connection	 * using a scheme other than btspp, btl2cap, or btgoep (for example, this	 * exception will be thrown if conn was created using the file or http	 * schemes.); if conn is a notifier used by a server to wait for a client	 * connection, since the notifier is not a connection to this RemoteDevice	 */	/*	 * public boolean encrypt(javax.microedition.io.Connection conn, boolean on)	 * throws IOException { }	 */	/*	 * Determines if this RemoteDevice has been authenticated. A device may have	 * been authenticated by this application or another application.	 * Authentication applies to an ACL link between devices and not on a	 * specific L2CAP, RFCOMM, or OBEX connection. Therefore, if authenticate()	 * is performed when an L2CAP connection is made to device A, then	 * isAuthenticated() may return true when tested as part of making an RFCOMM	 * connection to device A.	 * 	 * Returns: true if this RemoteDevice has previously been authenticated;	 * false if it has not been authenticated or there are no open connections	 * between the local device and this RemoteDevice	 */	public boolean isAuthenticated() {		throw new NotImplementedError();	}	/*	 * Determines if this RemoteDevice has been authorized previously by the BCC	 * of the local device to exchange data related to the service associated	 * with the connection. Both clients and servers can call this method.	 * However, for clients this method returns false for all legal values of	 * the conn argument. Parameters: conn - a connection that this RemoteDevice	 * is using to access a service or provide a service Returns: true if conn	 * is a server-side connection and this RemoteDevice has been authorized;	 * false if conn is a client-side connection, or a server-side connection	 * that has not been authorized Throws: IllegalArgumentException - if conn	 * is not a connection to this RemoteDevice; if conn was not created using	 * one of the schemes btspp, btl2cap, or btgoep; or if conn is a notifier	 * used by a server to wait for a client connection, since the notifier is	 * not a connection to this RemoteDevice. java.io.IOException - if conn is	 * closed	 */	public boolean isAuthorized(javax.microedition.io.Connection conn)			throws IOException {		// TODO not yet implemented		return false;	}	/*	 * Determines if data exchanges with this RemoteDevice are currently being	 * encrypted. Encryption may have been previously turned on by this or	 * another application. Encryption applies to an ACL link between devices	 * and not on a specific L2CAP, RFCOMM, or OBEX connection. Therefore, if	 * encrypt() is performed with the on parameter set to true when an L2CAP	 * connection is made to device A, then isEncrypted() may return true when	 * tested as part of making an RFCOMM connection to device A.	 * 	 * Returns: true if data exchanges with this RemoteDevice are being	 * encrypted; false if they are not being encrypted, or there are no open	 * connections between the local device and this RemoteDevice	 */	public boolean isEncrypted() {		// TODO not yet implemented		return false;	}}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲福利一区二区| 亚洲乱码中文字幕综合| 99国产精品久久久久久久久久 | 国产一区在线看| 亚洲精品第1页| 亚洲国产精品二十页| 欧美午夜精品一区二区蜜桃| 国产精品1区2区| 国产一区二区在线视频| 成人国产精品免费观看视频| 午夜在线成人av| 性做久久久久久久免费看| 亚洲视频资源在线| 日日夜夜精品免费视频| 国产精品一区在线观看乱码| 精品一区二区综合| 国产美女一区二区| 国产成都精品91一区二区三| 国产精品自在欧美一区| 国产老妇另类xxxxx| 黄网站免费久久| 风流少妇一区二区| www.久久精品| 欧美日韩一级片网站| 欧美一卡2卡三卡4卡5免费| 日韩视频一区在线观看| 国产三级一区二区三区| 亚洲乱码精品一二三四区日韩在线| 日韩欧美国产wwwww| 久久久久高清精品| 亚洲日本欧美天堂| 久久99久久99| 成人av网站在线观看免费| 欧美三日本三级三级在线播放| 欧美欧美欧美欧美首页| 日韩视频中午一区| 综合久久国产九一剧情麻豆| 亚洲一区二区黄色| 欧美午夜精品一区二区蜜桃| 欧美精品 日韩| 国产精品情趣视频| 婷婷久久综合九色国产成人| 国产成人精品亚洲日本在线桃色| 99久久精品久久久久久清纯| 欧美一区二区三区在线观看视频| 亚洲欧美视频一区| 不卡av在线网| 国产精品欧美一区二区三区| 韩日欧美一区二区三区| 欧美一区永久视频免费观看| 国产色一区二区| 美女www一区二区| 欧美性感一类影片在线播放| 日本一区二区不卡视频| 欧美日韩国产高清一区二区三区| 日韩一本二本av| 亚洲国产精品一区二区www在线| 国产成人h网站| 国产日本欧洲亚洲| 久久国产精品色婷婷| 欧美日韩一区不卡| 亚洲小少妇裸体bbw| 色狠狠桃花综合| 亚洲卡通动漫在线| 91色.com| 亚洲第一狼人社区| 欧美日韩精品一区二区天天拍小说| 一区二区三区在线视频播放| 91蜜桃婷婷狠狠久久综合9色| 国产精品毛片大码女人| 色婷婷精品久久二区二区蜜臀av | 精品欧美一区二区在线观看| 午夜精品123| 欧美电影免费观看完整版| 激情综合网av| 国产精品久久免费看| 99riav一区二区三区| 亚洲午夜羞羞片| 日韩美女天天操| 国产精品一级片在线观看| 国产精品日韩成人| 欧美亚洲国产怡红院影院| 青娱乐精品视频| 国产日韩一级二级三级| 91在线高清观看| 美腿丝袜亚洲色图| 中文字幕亚洲在| 在线播放中文字幕一区| 国产乱人伦精品一区二区在线观看| 中文字幕视频一区| 日韩一区二区三区视频在线观看| 不卡的电影网站| 亚洲成人777| 自拍偷拍亚洲激情| 久久免费的精品国产v∧| 欧美三级日韩三级| 成人免费毛片片v| 麻豆国产欧美一区二区三区| 综合久久综合久久| 精品剧情在线观看| 欧美日韩国产一二三| www.久久精品| 成人高清在线视频| 成人久久视频在线观看| 韩国精品久久久| 日本伊人精品一区二区三区观看方式| 日韩一区欧美一区| 中文一区二区完整视频在线观看 | 欧美一区二区三区在线电影| 日本韩国精品一区二区在线观看| 国产成人精品免费一区二区| 日韩黄色免费电影| 亚洲高清久久久| 亚洲午夜精品网| 亚洲国产一区二区三区| 一区二区三区在线视频观看| 国产精品欧美极品| 国产视频一区在线观看| 亚洲精品一区在线观看| 日韩一级欧美一级| 久久久国产一区二区三区四区小说| 欧美xxxx老人做受| 久久精品欧美一区二区三区不卡| 久久久精品一品道一区| 欧美经典三级视频一区二区三区| 久久久美女毛片| 国产精品日产欧美久久久久| 国产精品不卡一区二区三区| 中文字幕中文字幕在线一区 | 国产精品理伦片| 亚洲精品成人在线| 免费欧美在线视频| 精品一区二区三区久久| 粉嫩高潮美女一区二区三区| 一本大道综合伊人精品热热 | 欧美日韩国产综合一区二区三区| 欧美夫妻性生活| 国产欧美日韩精品一区| 亚洲一区二区免费视频| 久久精品国产999大香线蕉| 国产不卡一区视频| 欧美久久久久久久久久| 久久久国产午夜精品| 亚洲成a人片在线观看中文| 国产最新精品精品你懂的| 91久久精品网| www精品美女久久久tv| 亚洲自拍都市欧美小说| 黄色日韩网站视频| 中文字幕一区二区三区在线播放 | 国产福利精品一区| 日韩亚洲欧美在线观看| 亚洲免费观看高清完整| 极品少妇xxxx精品少妇| 欧美三电影在线| 亚洲精品视频免费看| 国产不卡视频一区二区三区| 欧美v亚洲v综合ⅴ国产v| 丝袜亚洲另类欧美综合| 在线观看视频91| 亚洲欧美视频在线观看视频| av一区二区三区在线| 欧美国产一区视频在线观看| 免费成人在线影院| 91精品国产综合久久精品| 亚洲观看高清完整版在线观看 | 成人夜色视频网站在线观看| 精品国产欧美一区二区| 麻豆精品一区二区三区| 欧美一区二区视频观看视频| 日韩一区精品视频| 欧美白人最猛性xxxxx69交| 青青草97国产精品免费观看| 欧美mv日韩mv亚洲| 国产福利91精品一区二区三区| 久久嫩草精品久久久精品| 韩国一区二区在线观看| 亚洲国产成人在线| 欧美在线观看视频一区二区三区| 亚洲成人av一区二区三区| 欧美电影免费观看高清完整版| 国产一区二区主播在线| 国产亚洲va综合人人澡精品| 91丨porny丨在线| 奇米影视一区二区三区| 中文字幕免费在线观看视频一区| 色一区在线观看| 卡一卡二国产精品| 国产精品二三区| 91精品国产乱| 91丨九色丨尤物| 国产传媒一区在线| 日韩精品免费视频人成| 国产亚洲欧美中文| 欧美日韩精品一区二区在线播放 | 欧美国产精品专区| 欧美日韩中文精品| 波多野结衣精品在线| 免费欧美日韩国产三级电影| 亚洲欧美一区二区在线观看|