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