private void closeIO() {
   try {
     mIn.close();
   } catch (Exception e) {
     /*
      * May fail if the connection is already closed.
      */
   }
   try {
     mOut.close();
   } catch (Exception e) {
     /*
      * May fail if the connection is already closed.
      */
   }
   try {
     mSocket.close();
   } catch (Exception e) {
     /*
      * May fail if the connection is already closed.
      */
   }
   mIn = null;
   mOut = null;
   mSocket = null;
 }
Exemplo n.º 2
0
  @Override
  public void close() {
    try {
      executeSimpleCommand("QUIT");
    } catch (Exception e) {

    }
    try {
      mIn.close();
    } catch (Exception e) {

    }
    try {
      mOut.close();
    } catch (Exception e) {

    }
    try {
      mSocket.close();
    } catch (Exception e) {

    }
    mIn = null;
    mOut = null;
    mSocket = null;
  }