forked from I2P_Developers/i2p.i2p
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:
@ -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();
|
||||
|
Reference in New Issue
Block a user