public void dispose(){
  try {
    if (_myInput != null) {
      _myInput.close();
    }
    if (_myOutput != null) {
      _myOutput.close();
    }
  }
 catch (  final Exception e) {
    e.printStackTrace();
  }
  _myInput=null;
  _myOutput=null;
  try {
    if (_mySocket != null) {
      _mySocket.close();
    }
  }
 catch (  final Exception e) {
    e.printStackTrace();
  }
  if (_myThread == null) {
    return;
  }
  _mySocket=null;
  _myThread=null;
  handleStatus(NetStatus.CONNECTION_CLOSED);
  Logger.printProcess("TcpClient.dispose","TcpClient closed.");
}

public void dispose ( ) { try { if ( _myInput != null ) { _myInput . close ( ) ; } if ( _myOutput != null ) { _myOutput . close ( ) ; } } catch ( final Exception e ) { e . printStackTrace ( ) ; } _myInput = null ; _myOutput = null ; try { if ( _mySocket != null ) { _mySocket . close ( ) ; } } catch ( final Exception e ) { e . printStackTrace ( ) ; } if ( _myThread == null ) { return ; } _mySocket = null ; _myThread = null ; handleStatus ( NetStatus . CONNECTION_CLOSED ) ; Logger . printProcess ( "TcpClient.dispose" , "TcpClient closed." ) ; }
stop and dispose a tcp client .
