Examples of HashWrapper


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

    int      _type,
    byte[]    _encoded )
  {
    type    = _type;
    encoded    = _encoded;
    hashcode  = new HashWrapper( encoded ).hashCode();
  }
View Full Code Here

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

 
  public ByteArrayWrapper
  createWrapper(
    byte[]    data )
  {
    return( new HashWrapper( data ));
  }
View Full Code Here

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

    boolean      unused_force )
  {
    if ( torrent != null ){

      try{
        HashWrapper hw = torrent.getHashWrapper();
       
        TRTrackerDHTScraperResponseImpl response = responses.get( hw );
       
        if ( response == null ){
         
View Full Code Here

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

    URL        unused_target_url )
  {
    if ( torrent != null ){

      try{
        HashWrapper hw = torrent.getHashWrapper();
       
        return( responses.get( hw ));
       
      }catch( TOTorrentException e ){
       
View Full Code Here

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

 
    throws DistributedDatabaseException
  {
    throwIfNotAvailable();
   
    final HashWrapper  type_key = DDBaseHelpers.getKey( type.getClass());
   
    if ( transfer_map.get( type_key ) != null ){
     
      throw( new DistributedDatabaseException( "Handler for class '" + type.getClass().getName() + "' already defined" ));
    }
   
    transfer_map.put( type_key, handler );
   
    final String  handler_name;
   
    if ( type == torrent_transfer ){
     
      handler_name = "Torrent Transfer";
     
    }else{
     
      String class_name = type.getClass().getName();
     
      int  pos = class_name.indexOf( '$' );
     
      if ( pos != -1 ){
       
        class_name = class_name.substring( pos+1 );
       
      }else{
     
        pos = class_name.lastIndexOf( '.' );
       
        if ( pos != -1 ){
         
          class_name = class_name.substring( pos+1 );
        }
      }
     
      handler_name = "Plugin Defined (" + class_name + ")";
    }
   
    getDHT().registerHandler(
      type_key.getHash(),
      new DHTPluginTransferHandler()
      {
        public String
        getName()
        {
View Full Code Here

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

    if ( name == null ){
     
      throw( new DistributedDatabaseException( "name doesn't exist for '" + c.getName() + "'" ));
    }
     
    return( new HashWrapper(new SHA1Simple().calculateHash(name.getBytes())));
  }
View Full Code Here

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

             
      downloadData download_data = new downloadData( download );
       
      download.setUserData( BuddyPluginTracker.class, download_data );
     
      HashWrapper  full_id    = download_data.getID();
     
      HashWrapper short_id   = new HashWrapper( full_id.getHash(), 0, 4 );
     
      full_id_map.put( full_id, download );
     
      List  dls = (List)short_id_map.get( short_id );
     
View Full Code Here

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

       
        downloadData download_data = (downloadData)download.getUserData( BuddyPluginTracker.class );
               
        download.setUserData( BuddyPluginTracker.class, null );
       
        HashWrapper  full_id    = download_data.getID();
       
        full_id_map.remove( full_id );
       
        HashWrapper short_id   = new HashWrapper( full_id.getHash(), 0, SHORT_ID_SIZE );
       
        List  dls = (List)short_id_map.get( short_id );

        if ( dls != null ){
         
View Full Code Here

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

       
        synchronized( tracked_downloads ){

          for (int i=0;i<ids.length;i+= SHORT_ID_SIZE ){
         
            List dls = (List)short_id_map.get( new HashWrapper( ids, i, SHORT_ID_SIZE ));
           
            if ( dls != null ){
             
              res.addAll( dls );
            }
View Full Code Here

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

       
        synchronized( tracked_downloads ){

          for (int i=0;i<ids.length;i+= FULL_ID_SIZE ){
         
            Download dl = (Download)full_id_map.get( new HashWrapper( ids, i, FULL_ID_SIZE ));
           
            if ( dl != null ){
             
              buddyDownloadData bdd = new buddyDownloadData( dl );
             
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.