Blackberry JAVA DEVELOPMENT ENVIRONMENT - - CRYPTOGRAPHIC SMART CARD DRIVER - DEVELOPMENT GUIDE Guide de dépannage Page 131

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 286
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 130
131
7: Creating connections
public void close()
{
closePort();
super.close();
}
}
public static void main(String[] args)
{
new BluetoothSerialPortDemo().enterEventDispatcher();
}
//constructor --------------------------------------------------------------
public BluetoothSerialPortDemo()
{
MainScreen mainScreen = new BluetoothDemoScreen();
mainScreen.setTitle(new LabelField(_resources.getString(TITLE),
LabelField.USE_ALL_WIDTH));
_infoField = new EditField(Field.READONLY);
mainScreen.add(_infoField);
pushScreen(mainScreen);
invokeLater(new Runnable() {
public void run() {
openPort();
}
});
}
// Close the serial port.
private void closePort() {
if (_bluetoothConnection != null) {
try {
_bluetoothConnection.close();
} catch(IOException ioe) {
}
}
if (_din != null) {
try {
_din.close();
} catch(IOException ioe) {
}
}
if (_dout != null) {
try {
_dout.close();
} catch(IOException ioe) {
Vue de la page 130
1 2 ... 126 127 128 129 130 131 132 133 134 135 136 ... 285 286

Commentaires sur ces manuels

Pas de commentaire