public void updateProgress(ProgressSource pi){
synchronized (progressSourceList) {
    if (progressSourceList.contains(pi) == false)     return;
  }
  if (progressListenerList.size() > 0) {
    ArrayList<ProgressListener> listeners=new ArrayList<ProgressListener>();
synchronized (progressListenerList) {
      for (Iterator<ProgressListener> iter=progressListenerList.iterator(); iter.hasNext(); ) {
        listeners.add(iter.next());
      }
    }
    for (Iterator<ProgressListener> iter=listeners.iterator(); iter.hasNext(); ) {
      ProgressListener pl=iter.next();
      ProgressEvent pe=new ProgressEvent(pi,pi.getURL(),pi.getMethod(),pi.getContentType(),pi.getState(),pi.getProgress(),pi.getExpected());
      pl.progressUpdate(pe);
    }
  }
}

public void updateProgress ( ProgressSource pi ) { synchronized ( progressSourceList ) { if ( progressSourceList . contains ( pi ) == false ) return ; } if ( progressListenerList . size ( ) > 0 ) { ArrayList < ProgressListener > listeners = new ArrayList < ProgressListener > ( ) ; synchronized ( progressListenerList ) { for ( Iterator < ProgressListener > iter = progressListenerList . iterator ( ) ; iter . hasNext ( ) ; ) { listeners . add ( iter . next ( ) ) ; } } for ( Iterator < ProgressListener > iter = listeners . iterator ( ) ; iter . hasNext ( ) ; ) { ProgressListener pl = iter . next ( ) ; ProgressEvent pe = new ProgressEvent ( pi , pi . getURL ( ) , pi . getMethod ( ) , pi . getContentType ( ) , pi . getState ( ) , pi . getProgress ( ) , pi . getExpected ( ) ) ; pl . progressUpdate ( pe ) ; } } }
progress source is updated .
