// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 // internal helper methods
 // XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 private void _setProgress(int bytesProcessed) {
   if (_uiHook != null) {
     switch (_type) {
       case RecvStatus:
         _uiHook.updateRecieveStatus(bytesProcessed, _size);
         break;
       case SendStatus:
         _uiHook.updateSendStatus(bytesProcessed, _size);
         break;
     }
   }
 }
 private boolean _isCanceled() {
   if (_uiHook != null) {
     return _uiHook.isCancelled();
   } else {
     return false;
   }
 }
 private void _interruptedIO() {
   if (_uiHook != null) _uiHook.interrupedIO();
 }
 private void _close() {
   if (_uiHook != null) _uiHook.close();
 }