Blackberry JAVA DEVELOPMENT ENVIRONMENT - - CRYPTOGRAPHIC SMART CARD DRIVER - DEVELOPMENT GUIDE Guia de Resolução de Problemas Página 131

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 286
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 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) {
Vista de página 130
1 2 ... 126 127 128 129 130 131 132 133 134 135 136 ... 285 286

Comentários a estes Manuais

Sem comentários