2004-12-05 jrandom

* Default the I2CP listener to localhost only, unless overridden by
      i2cp.tcp.bindAllInterfaces=true (thanks dm!)
    * More SAM fixes for things recently broken (whee)
This commit is contained in:
jrandom
2004-12-06 00:54:07 +00:00
committed by zzz
parent 499eeb275b
commit 88bb176f3b
8 changed files with 70 additions and 37 deletions

View File

@ -670,6 +670,26 @@ public class DataHelper {
}
return cur;
}
/**
* Read a newline delimited line from the stream, returning the line (without
* the newline), or null if EOF reached before the newline was found
*/
public static String readLine(InputStream in) throws IOException {
StringBuffer buf = new StringBuffer(128);
int c = -1;
while ( (c = in.read()) != -1) {
if (c == '\n')
break;
buf.append((char)c);
}
if (c == -1)
return null;
else
return buf.toString();
}
public static List sortStructures(Collection dataStructures) {
if (dataStructures == null) return new ArrayList();