changed writeMap

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3065 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
borg-0300 18 years ago
parent fb9e0f0284
commit 5b00a04359

@ -232,25 +232,18 @@ abstract class kelondroAbstractRA implements kelondroRA {
this.seek(0);
final Iterator iter = map.entrySet().iterator();
Map.Entry entry;
serverByteBuffer bb = new serverByteBuffer(map.size() * 40);
bb.append("# " + comment);
bb.append(cr);
bb.append(lf);
final serverByteBuffer bb = new serverByteBuffer(map.size() * 40);
bb.append("# ").append(comment).append("\r\n");
while (iter.hasNext()) {
entry = (Map.Entry) iter.next();
bb.append((String) entry.getKey());
bb.append('=');
bb.append((String) entry.getValue());
bb.append(cr);
bb.append(lf);
bb.append((String) entry.getKey()).append('=');
if (entry.getValue() != null) { bb.append(entry.getValue().toString()); }
bb.append("\r\n");
}
bb.append("# EOF");
bb.append(cr);
bb.append(lf);
bb.append("# EOF\r\n");
write(bb.getBytes());
}
public Map readMap() throws IOException {
this.seek(0);
byte[] b = readFully();

Loading…
Cancel
Save