Package org.jmule.core.uploadmanager

Examples of org.jmule.core.uploadmanager.FileChunkRequest


      while (!((endPos >= f1.getStart()) && (endPos <= f1.getEnd())))

        endPos--;

      return new FileChunkRequest(startPos, endPos);
    } while (true);

  }
View Full Code Here


    FileChunkRequest[] fileChunks = new FileChunkRequest[3];

    for (int i = 0; i < fileChunks.length; i++) {

      FileChunkRequest fileChunk = this.fileChunkRequest(sender,
          blockSize, fileSize, gapList, filePartStatus,
          fileRequestList);

      if (fileChunk == null)

        fileChunk = new FileChunkRequest(0, 0);

      else

        fileRequestList.addFragment(sender, fileChunk.getChunkBegin(),
            fileChunk.getChunkEnd());

      fileChunks[i] = fileChunk;
    }

    return fileChunks;
View Full Code Here

    if (blockSize > BLOCKSIZE)

      blockSize = BLOCKSIZE;
   
    FileChunkRequest fragments[] = downloadStrategy.fileChunk3Request(peer,
        blockSize, this.sharedFile.length(), sharedFile.getGapList(),
        partStatus, fileRequestList);

    int unused = 0;
View Full Code Here

          for (int i = 0; i < 3; i++) {
            if ((startPos[i] == endPos[i]) && (startPos[i] == 0))
              break;
            chunks
                .add(new FileChunkRequest(startPos[i],
                    endPos[i]));
          }

          _network_manager.receivedFileChunkRequestFromPeer(peerIP,
              peerPort, new FileHash(file_hash), chunks);
View Full Code Here

TOP

Related Classes of org.jmule.core.uploadmanager.FileChunkRequest

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.