Examples of DMPieceMapperFile


Examples of org.gudy.azureus2.core3.disk.impl.piecemapper.DMPieceMapperFile

        save_location = save_location.getParentFile();
      }
   
      for (int i = 0; i < pm_files.length; i++) {
       
        DMPieceMapperFile pm_info = pm_files[i];
       
        File  relative_file = pm_info.getDataFile();
       
        long target_length = pm_info.getLength();
             
        DiskManagerFileInfoImpl  file_info =
          new DiskManagerFileInfoImpl(
                      this,
                      new File( save_location, relative_file.toString()),
                      i,
                      pm_info.getTorrentFile(),
                      DiskManagerFileInfo.ST_LINEAR );
       
        local_files[i] = file_info;

        CacheFile  cache_file  = file_info.getCacheFile();
        File    data_file  = file_info.getFile(true);
 
        if ( !cache_file.exists()){
           
          throw( new Exception( "File '" + data_file + "' doesn't exist" ));
        }
       
        if ( cache_file.getLength() != target_length ){
       
          throw( new Exception( "File '" + data_file + "' doesn't exist" ));
       
        }
       
        pm_info.setFileInfo( file_info );
      }
   
      ok  = true;
     
      return( local_files );
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.