Package org.gudy.azureus2.core3.util

Examples of org.gudy.azureus2.core3.util.SHA1Simple


    if (!(widget instanceof Shell)) {
      return eventNotHandledErr;
    }
    final Shell shellAffected = (Shell) widget;

    Utils.execSWTThread(new AERunnable() {
      public void runSupport() {
        int type;
        Long l = (Long) shellAffected.getData("OSX.ToolBarToggle");
        if (l == null || l.longValue() == 0) {
          type = SWT.Collapse;
View Full Code Here


  // @see org.gudy.azureus2.plugins.utils.resourcedownloader.ResourceDownloaderListener#completed(org.gudy.azureus2.plugins.utils.resourcedownloader.ResourceDownloader, java.io.InputStream)
  public boolean completed(ResourceDownloader downloader, InputStream data) {
    downloader.removeListener(this);
    if (!nextUpdate()) {
      // fire in another thread so completed function can exit
      AEThread thread = new AEThread("AllDownloadsComplete", true) {
        public void runSupport() {
          allDownloadsComplete();
        }
      };
      thread.start();
    }
    return true;
  }
View Full Code Here

      new Listener()
      {
        public void
        handleEvent(Event event)
        {
          new AEThread2("GenerateNetDiag", true)
          {
            public void run() {
              StringWriter sw = new StringWriter();
             
              PrintWriter  pw = new PrintWriter( sw );
View Full Code Here

    progress.setLayoutData( data );
   
    parent.layout( true, true );
   
    new AEThread2( "SimpleInstallerUI", true )
    {
      public void
      run()
      {
        try{
View Full Code Here

            public void run() {
              StringWriter sw = new StringWriter();
             
              PrintWriter  pw = new PrintWriter( sw );
                 
              IndentWriter iw = new IndentWriter( pw );
             
              NetworkAdmin admin = NetworkAdmin.getSingleton();
             
              admin.generateDiagnostics( iw );
             
View Full Code Here

    Map         localizationPaths,
    Collection       resource_bundles,
    int          initCapacity
  {
    this.initCapacity = initCapacity;
    messages = new LightHashMap(initCapacity);

    locale = main.getLocale();

      // use a somewhat decent initial capacity, proper calculation would require java 1.6
   
    addResourceMessages( main );
   
    synchronized (localizationPaths)
    {
      for (Iterator iter = localizationPaths.keySet().iterator(); iter.hasNext();){
        String localizationPath = (String) iter.next();
        ClassLoader classLoader = (ClassLoader) localizationPaths.get(localizationPath);

        addPluginBundle(localizationPath, classLoader);
      }
    }

    if (resource_bundles != null) {
      synchronized (resource_bundles)
      {
        for (Iterator itr = resource_bundles.iterator(); itr.hasNext();) {
          addResourceMessages((ResourceBundle)itr.next());
        }
      }

    }
   
    used_messages = new LightHashMap( messages.size());
   
    synchronized( bundle_map ){
     
      bundle_map.put( this, NULL_OBJECT );
     
View Full Code Here

  }
 
  protected Iterator
  getKeysLight()
  {
    Map m = new LightHashMap(loadMessages());
   
    return( m.keySet().iterator());
  }
View Full Code Here

      }
    }
   
    if ( clean_count > 5 ){
   
      Map  compact_um = new LightHashMap( used_messages.size() + 16 );
     
      compact_um.putAll( used_messages );
     
      used_messages = compact_um;
     
      return( false );
     
View Full Code Here

     
      Map  result;
     
      if ( scratch_file_is == null ){
       
        result = new LightHashMap();
       
      }else{
     
          // System.out.println( "read cache file " + scratch_file_name + " for " + this );

       
        Properties p = new Properties();
       
        InputStream  fis = scratch_file_is;
       
        try{
                 
          p.load( fis );
         
          fis.close();
         
          scratch_file_is = new FileInputStream( scratch_file_name );
         
          messages = new LightHashMap();
         
          messages.putAll( p );
         
          result = messages;
         
        }catch( Throwable e ){
         
          if ( fis != null ){
           
            try{
              fis.close();
             
            }catch( Throwable f ){
            }
          }
         
          Debug.out( "Failed to load message bundle scratch file", e );
         
          scratch_file_name.delete();
         
          scratch_file_is = null;
         
          result = new LightHashMap();
        }
      }
     
      if ( added_strings != null ){
       
View Full Code Here

      null_values = null;
    }
  }
 
  public void clearUsedMessagesMap(int initialCapacity) {
    used_messages = new LightHashMap(initialCapacity);
    if (null_values != null) {
      null_values = new ArrayList(0);
    }
  }
View Full Code Here

TOP

Related Classes of org.gudy.azureus2.core3.util.SHA1Simple

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.