203 |
|
|
204 |
writeRewriteLinks(w, rewrite); |
writeRewriteLinks(w, rewrite); |
205 |
|
|
206 |
for(Iterator i=pool.getIds().block().iterator(); |
SetCollector ids = pool.getIds(); |
207 |
i.hasNext();) { |
|
208 |
BlockId id = (BlockId)i.next(); |
try { |
209 |
String s = id.getURI(); |
// wait for DHT to receive information from network |
210 |
if(rewrite) s = base + s; |
Thread.sleep(2000); |
211 |
w.write("<a href=\""+s+"\">"+id+"</a><br>\n"); |
} catch(InterruptedException _) {} |
212 |
|
|
213 |
|
System.out.println("start recv'n"); |
214 |
|
|
215 |
|
synchronized(ids) { |
216 |
|
for(Iterator i=ids.iterator(); i.hasNext();) { |
217 |
|
BlockId id = (BlockId)i.next(); |
218 |
|
System.out.println("recvd: "+id); |
219 |
|
String s = id.getURI(); |
220 |
|
if(rewrite) s = base + s; |
221 |
|
w.write("<a href=\""+s+"\">"+id+"</a><br>\n"); |
222 |
|
} |
223 |
} |
} |
224 |
w.write("</body></html>\n"); |
w.write("</body></html>\n"); |
225 |
w.close(); |
w.close(); |