Package freenet.io.xfer

Examples of freenet.io.xfer.PartiallyReceivedBulk


        this.nodesAskedSendMainJar.remove(source);
      }
      return true;
    }

    PartiallyReceivedBulk prb = new PartiallyReceivedBulk(updateManager.node.getUSM(), length,
      Node.PACKET_SIZE, raf, false);

    final BulkReceiver br = new BulkReceiver(prb, source, uid, updateManager.ctr);

    updateManager.node.executor.execute(new Runnable() {
View Full Code Here


              " even though we did have it when we checked!: " + e, e);
      raf = null;
      fail = true;
    }
   
    PartiallyReceivedBulk prb;
    if(raf != null) {
        long thisLength = raf.size();
        prb = new PartiallyReceivedBulk(updateManager.node.getUSM(), thisLength,
                Node.PACKET_SIZE, raf, true);
        if(length != thisLength) {
            fail = true;
        }
    } else {
        prb = new PartiallyReceivedBulk(updateManager.node.getUSM(), 0,
                Node.PACKET_SIZE, new ByteArrayRandomAccessBuffer(new byte[0]), true);
        fail = true;
    }
   
    try {
View Full Code Here

            System.out.println("Fetching "+saveTo+" from "+fetchFrom);
            long uid = updateManager.node.fastWeakRandom.nextLong();
            fetchFrom.sendAsync(DMT.createUOMFetchDependency(uid, expectedHash, size), null, updateManager.ctr);
            tmp = FileUtil.createTempFile(saveTo.getName(), NodeUpdateManager.TEMP_FILE_SUFFIX, saveTo.getParentFile());
            raf = new FileRandomAccessBuffer(tmp, size, false);
            PartiallyReceivedBulk prb =
              new PartiallyReceivedBulk(updateManager.node.getUSM(), size,
                Node.PACKET_SIZE, raf, false);
            BulkReceiver br = new BulkReceiver(prb, fetchFrom, uid, updateManager.ctr);
            failed = !br.receive();
            raf.close();
            raf = null;
View Full Code Here

TOP

Related Classes of freenet.io.xfer.PartiallyReceivedBulk

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.