From af098b815c2042bb0e8af87abc60f457c5f93ab1 Mon Sep 17 00:00:00 2001 From: orbiter Date: Sat, 20 May 2006 12:09:58 +0000 Subject: [PATCH] - fix for blog/wiki error - re-enabled new map writing methods see http://www.yacy-forum.de/viewtopic.php?p=21729#21729 git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2124 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- .../anomic/kelondro/kelondroAbstractRA.java | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/source/de/anomic/kelondro/kelondroAbstractRA.java b/source/de/anomic/kelondro/kelondroAbstractRA.java index 5660d8cb6..f80f3f933 100644 --- a/source/de/anomic/kelondro/kelondroAbstractRA.java +++ b/source/de/anomic/kelondro/kelondroAbstractRA.java @@ -53,6 +53,8 @@ import java.util.Iterator; import java.util.Map; import java.util.TreeMap; +import de.anomic.server.serverByteBuffer; + abstract class kelondroAbstractRA implements kelondroRA { // logging support @@ -191,7 +193,7 @@ abstract class kelondroAbstractRA implements kelondroRA { bb[bbsize++] = (byte) c; } } - +/* public void writeMap(final Map map, final String comment) throws IOException { this.seek(0); writeLine("# " + comment); @@ -221,28 +223,28 @@ abstract class kelondroAbstractRA implements kelondroRA { } return map; } +*/ - /* public void writeMap(final Map map, final String comment) throws IOException { this.seek(0); final Iterator iter = map.entrySet().iterator(); Map.Entry entry; - StringBuffer sb = new StringBuffer(map.size() * 40); - sb.append("# " + comment); - sb.append(cr); - sb.append(lf); + serverByteBuffer bb = new serverByteBuffer(map.size() * 40); + bb.append("# " + comment); + bb.append(cr); + bb.append(lf); while (iter.hasNext()) { entry = (Map.Entry) iter.next(); - sb.append((String) entry.getKey()); - sb.append('='); - sb.append((String) entry.getValue()); - sb.append(cr); - sb.append(lf); + bb.append((String) entry.getKey()); + bb.append('='); + bb.append((String) entry.getValue()); + bb.append(cr); + bb.append(lf); } - sb.append("# EOF"); - sb.append(cr); - sb.append(lf); - write(new String(sb).getBytes()); + bb.append("# EOF"); + bb.append(cr); + bb.append(lf); + write(bb.getBytes()); } @@ -263,7 +265,7 @@ abstract class kelondroAbstractRA implements kelondroRA { } return map; } - */ + /** * this does not write the content to the see position