|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.avetana.bluetooth.util.BTAddress
COPYRIGHT:
(c) Copyright 2004 Avetana GmbH ALL RIGHTS RESERVED.
This file is part of the Avetana bluetooth API for Linux.
The Avetana bluetooth API for Linux is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
The Avetana bluetooth API 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 General Public License for more details.
The development of the Avetana bluetooth API is based on the work of
Christian Lorenz (see the Javabluetooth Stack at http://www.javabluetooth.org) for some classes,
on the work of the jbluez team (see http://jbluez.sourceforge.net/) and
on the work of the bluez team (see the BlueZ linux Stack at http://www.bluez.org) for the C code.
Classes, part of classes, C functions or part of C functions programmed by these teams and/or persons
are explicitly mentioned.
Description:
Java representation of a Bluetooth device address.
A Bluetooth device address is comprised of six pairs of hex digits,
for example 00:12:34:56:78:9A.
This class is based upon the bdaddr_t type, as defined in bluetooth.h
of the BlueZ libraries.
| Field Summary | |
short[] |
addr_arr
The address is stored as six 8-bit numbers. |
| Constructor Summary | |
BTAddress()
Default constructor |
|
BTAddress(java.lang.String addr_str)
Creates a BTAddress object from the address addr_str. |
|
| Method Summary | |
boolean |
equals(BTAddress compare)
Compares two BTAddress objects to see if they represent the same Bluetooth device address. |
static BTAddress |
parseString(java.lang.String original)
|
void |
setValue(java.lang.String addr_str)
Set the Bluetooth device address. |
java.lang.String |
toString()
Returns a String representation of the Bluetooth device address in the form " 00:12:34:56:78:9A". |
java.lang.String |
toStringSep(boolean with)
|
static java.lang.String |
transform(java.lang.String original)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public short[] addr_arr
| Constructor Detail |
public BTAddress()
public BTAddress(java.lang.String addr_str)
throws BTAddressFormatException
BTAddress object from the address addr_str. The address string should be in the form "00:12:34:56:78:9A".
addr_str - String representation of the Bluetooth device
address.
BTAddressFormatException - If the String is not a parsable
Bluetooth address.| Method Detail |
public void setValue(java.lang.String addr_str)
throws BTAddressFormatException
00:12:34:56:78:AB", that is 6, colon separated pairs of hex digits.
addr_str - String representation of the Bluetooth device
address.
BTAddressFormatException - If the String is not a parsable
Bluetooth address.public java.lang.String toString()
00:12:34:56:78:9A".
public java.lang.String toStringSep(boolean with)
public static java.lang.String transform(java.lang.String original)
throws java.lang.Exception
java.lang.Exception
public static BTAddress parseString(java.lang.String original)
throws java.lang.Exception
java.lang.Exceptionpublic boolean equals(BTAddress compare)
compare - The BTAddress object to compare to this.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||