/** * Constructs a new RemoteFileDesc exactly like the other one, but with a different push proxy * host. Will be handy when processing head pongs. */ public RemoteFileDesc(RemoteFileDesc rfd, PushEndpoint pe) { this( rfd.getHost(), // host - ignored rfd.getPort(), // port -ignored COPY_INDEX, // index (unknown) rfd.getFileName(), // filename rfd.getSize(), // filesize rfd.getSpeed(), // speed false, // chat capable rfd.getQuality(), // quality false, // browse hostable rfd.getUrns(), // urns false, // reply to MCast true, // is firewalled AlternateLocation.ALT_VENDOR, // vendor System.currentTimeMillis(), // timestamp rfd.getCreationTime(), // creation time pe); }
/** * Constructs a new RemoteFileDesc exactly like the other one, but with a different remote host. * * <p>It is okay to use the same internal structures for URNs because the Set is immutable. */ public RemoteFileDesc(RemoteFileDesc rfd, IpPort ep) { this( ep.getAddress(), // host ep.getPort(), // port COPY_INDEX, // index (unknown) rfd.getFileName(), // filename rfd.getSize(), // filesize DataUtils.EMPTY_GUID, // client GUID 0, // speed false, // chat capable 2, // quality false, // browse hostable rfd.getUrns(), // urns false, // reply to MCast false, // is firewalled AlternateLocation.ALT_VENDOR, // vendor System.currentTimeMillis(), // timestamp Collections.EMPTY_SET, // push proxies rfd.getCreationTime(), // creation time 0); // firewalled transfer }