Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
removed some unused methods
orbitere656a00b7406
diff --git a/source/de/anomic/kelondro/kelondroAbstractRA.java b/source/de/anomic/kelondro/kelondroAbstractRA.javaindex 2ed8614a1..05c1b2d00 100644--- a/source/de/anomic/kelondro/kelondroAbstractRA.java+++ b/source/de/anomic/kelondro/kelondroAbstractRA.java@@ -49,10 +49,8 @@ import java.io.ByteArrayInputStream;import java.io.ByteArrayOutputStream;import java.io.IOException;import java.io.InputStreamReader;-import java.util.Enumeration;import java.util.Iterator;import java.util.Map;-import java.util.Properties;import java.util.TreeMap;abstract class kelondroAbstractRA implements kelondroRA {@@ -194,47 +192,6 @@ abstract class kelondroAbstractRA implements kelondroRA {}}- public void writeProperties(final Properties props, final String comment) throws IOException {- this.seek(0);- final Enumeration e = props.propertyNames();- String key, value;- StringBuffer sb = new StringBuffer(props.size() * 40);- sb.append("# " + comment);- sb.append(cr);- sb.append(lf);- while (e.hasMoreElements()) {- key = (String) e.nextElement();- value = props.getProperty(key, "");- sb.append(key);- sb.append('=');- sb.append(value);- sb.append(cr);- sb.append(lf);- }- sb.append("# EOF");- sb.append(cr);- sb.append(lf);- write(new String(sb).getBytes());- }-- public Properties readProperties() throws IOException {- this.seek(0);- byte[] b = readFully();- BufferedReader br = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(b)));- final Properties props = new Properties();- String line;- int pos;- while ((line = br.readLine()) != null) {- line = line.trim();- if (line.equals("# EOF")) return props;- if ((line.length() == 0) || (line.charAt(0) == '#')) continue;- pos = line.indexOf("=");- if (pos < 0) continue;- props.setProperty(line.substring(0, pos).trim(), line.substring(pos + 1).trim());- }- return props;- }-public void writeMap(final Map map, final String comment) throws IOException {this.seek(0);final Iterator iter = map.entrySet().iterator();diff --git a/source/de/anomic/kelondro/kelondroFileRA.java b/source/de/anomic/kelondro/kelondroFileRA.javaindex dc478e17f..0075da758 100644--- a/source/de/anomic/kelondro/kelondroFileRA.java+++ b/source/de/anomic/kelondro/kelondroFileRA.java@@ -46,7 +46,6 @@ import java.io.FileNotFoundException;import java.io.IOException;import java.io.RandomAccessFile;import java.util.Map;-import java.util.Properties;public final class kelondroFileRA extends kelondroAbstractRA implements kelondroRA {@@ -97,31 +96,6 @@ public final class kelondroFileRA extends kelondroAbstractRA implements kelondro}// some static tools- public static void writeProperties(File f, Properties props, String comment) throws IOException {- File fp = f.getParentFile();- if (fp != null) fp.mkdirs();- kelondroRA kra = null;- try {- kra = new kelondroFileRA(f);- kra.writeProperties(props, comment);- kra.close();- } finally {- if (kra != null) try {kra.close();}catch(Exception e){}- }- }-- public static Properties readProperties(File f) throws IOException {- kelondroRA kra = null;- try {- kra = new kelondroFileRA(f);- Properties props = kra.readProperties();- kra.close();- return props;- } finally {- if (kra != null) try{kra.close();}catch(Exception e) {}- }- }-public static void writeMap(File f, Map map, String comment) throws IOException {File fp = f.getParentFile();if (fp != null) fp.mkdirs();diff --git a/source/de/anomic/kelondro/kelondroRA.java b/source/de/anomic/kelondro/kelondroRA.javaindex c68b45168..c0be9d9e5 100644--- a/source/de/anomic/kelondro/kelondroRA.java+++ b/source/de/anomic/kelondro/kelondroRA.java@@ -52,7 +52,6 @@ package de.anomic.kelondro;import java.io.IOException;import java.util.Map;-import java.util.Properties;public interface kelondroRA {@@ -71,7 +70,7 @@ public interface kelondroRA {// derived methods:public void readFully(byte[] b, int off, int len) throws IOException;- //public byte[] readFully() throws IOException;+ public byte[] readFully() throws IOException;public byte readByte() throws IOException;public void writeByte(int v) throws IOException;@@ -89,10 +88,6 @@ public interface kelondroRA {public void writeLine(String line) throws IOException;public String readLine() throws IOException;- // tool methods that organize the complete content- public void writeProperties(Properties props, String comment) throws IOException;- public Properties readProperties() throws IOException;-public void writeMap(Map props, String comment) throws IOException;public Map readMap() throws IOException;