private void throwCloseConnection() throws ClosedChannelException {
  ClosedChannelException closeEx=new ClosedChannelException();
  closeEx.initCause(new IOException("Connection has been closed by peer"));
  throw closeEx;
}

private void throwCloseConnection ( ) throws ClosedChannelException { ClosedChannelException closeEx = new ClosedChannelException ( ) ; closeEx . initCause ( new IOException ( "Connection has been closed by peer" ) ) ; throw closeEx ; }
throws closedchannelexception if remote peer socket closed
