// now parse the Strings in the value-vector and write index entries
String estring;
int p;
String wordHash;
byte[] urlHash;
WordReferenceRow iEntry;
final HandleSet unknownURL = new HandleSet(URIMetadataRow.rowdef.primaryKeyLength, URIMetadataRow.rowdef.objectOrder, 0);
final HandleSet knownURL = new HandleSet(URIMetadataRow.rowdef.primaryKeyLength, URIMetadataRow.rowdef.objectOrder, 0);
final ArrayList<String> wordhashes = new ArrayList<String>();
int received = 0;
int blocked = 0;
int receivedURL = 0;
final IndexCell<WordReference> cell = sb.indexSegments.termIndex(Segments.Process.DHTIN);
int count = 0;
while (it.hasNext()) {
serverCore.checkInterruption();
estring = it.next();
count++;
if (count > 1000) break; // protection against flooding
// check if RWI entry is well-formed
p = estring.indexOf('{',0);
if (p < 0 || estring.indexOf("x=",0) < 0 || !(estring.indexOf("[B@",0) < 0)) {
blocked++;
continue;
}
wordHash = estring.substring(0, p);
wordhashes.add(wordHash);
iEntry = new WordReferenceRow(estring.substring(p));
urlHash = iEntry.urlhash();
// block blacklisted entries
if ((blockBlacklist) && (Switchboard.urlBlacklist.hashInBlacklistedCache(Blacklist.BLACKLIST_DHT, urlHash))) {
if (Network.log.isFine()) Network.log.logFine("transferRWI: blocked blacklisted URLHash '" + ASCII.String(urlHash) + "' from peer " + otherPeerName);
blocked++;