this should be called when you stop using the port . this will prevent port locking on platforms like linux . concode_field_sep OutputStream output concode_elem_sep BufferedReader input concode_elem_sep String PORT_NAMES[] concode_elem_sep int TIME_OUT concode_elem_sep int DATA_RATE concode_elem_sep SerialPort serialPort concode_field_sep void serialEvent concode_elem_sep void main concode_elem_sep void initialize
void function ( ) { if ( serialPort != null ) { serialPort . removeEventListener ( ) ; serialPort . close ( ) ; } }