Package org.gudy.azureus2.core3.util

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


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


          break;
        }
       
        payload_buffer.flip();
       
        messages.add( new GenericMessage( msg_type, msg_desc, new DirectByteBuffer( payload_buffer ), false ));
       
        buffers[1= null;
      }
     
      total_read += bytes_read;
View Full Code Here

    if( core_msg == null ) {
      return plug_msg.create( data );
    }
   
    try{
      return new MessageAdapter( core_msg.deserialize( new DirectByteBuffer( data ), (byte)1 ) );
    }
    catch( com.aelitis.azureus.core.peermanager.messaging.MessageException e ) {
      throw new MessageException( e.getMessage() );
    }
  }
View Full Code Here

    }
   
    ByteBuffer[] bbs = plug_msg.getPayload();
    DirectByteBuffer[] dbbs = new DirectByteBuffer[ bbs.length ]//TODO cache it???
    for( int i=0; i < bbs.length; i++ ) {
      dbbs[i] = new DirectByteBuffer( bbs[i] );
    }
    return dbbs;
  }
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

      showDHTStats( ci );
   
    } else if (subCommand.equalsIgnoreCase("nat") || subCommand.equalsIgnoreCase("n")) {

      IndentWriter  iw = new IndentWriter( new PrintWriter( ci.out ));
     
      iw.setForce( true );
     
      NetworkAdmin.getSingleton().logNATStatus( iw );
   
    } else if (subCommand.equalsIgnoreCase("stats") || subCommand.equalsIgnoreCase("s")) {
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

TOP

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

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.