Class DeviceClass

  extended by javax.bluetooth.DeviceClass

public class DeviceClass
extends Object

The DeviceClass class represents the class of device (CoD) record as defined by the Bluetooth specification. This record is defined in the Bluetooth Assigned Numbers document and contains information on the type of the device and the type of services available on the device.

The Bluetooth Assigned Numbers document can be found at It defines the service class, major device class, and minor device class. The table below provides some examples of possible return values and their meaning:

MethodReturn ValueClass of Device
getServiceClasses() 0x22000 Networking and Limited Discoverable Major Service Classes
getServiceClasses() 0x100000 Object Transfer Major Service Class
getMajorDeviceClass() 0x00 Miscellaneous Major Device Class
getMajorDeviceClass() 0x200 Phone Major Device Class
getMinorDeviceClass() 0x0CWith a Computer Major Device Class, Laptop Minor Device Class
getMinorDeviceClass() 0x04With a Phone Major Device Class, Cellular Minor Device Class

BlackBerry API 4.2.1

Constructor Summary
DeviceClass(int record)
          Creates a DeviceClass from the class of device record provided.
Method Summary
 int getMajorDeviceClass()
          Retrieves the major device class.
 int getMinorDeviceClass()
          Retrieves the minor device class.
 int getServiceClasses()
          Retrieves the major service classes.
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public DeviceClass(int record)
Creates a DeviceClass from the class of device record provided. record must follow the format of the class of device record in the Bluetooth specification.

record - describes the classes of a device
IllegalArgumentException - if record has any bits between 24 and 31 set
BlackBerry API 4.2.1

Method Detail


public int getServiceClasses()
Retrieves the major service classes. A device may have multiple major service classes. When this occurs, the major service classes are bitwise OR'ed together.

the major service classes
BlackBerry API 4.2.1


public int getMajorDeviceClass()
Retrieves the major device class. A device may have only a single major device class.

the major device class
BlackBerry API 4.2.1


public int getMinorDeviceClass()
Retrieves the minor device class.

the minor device class
BlackBerry API 4.2.1

Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.