forked from I2P_Developers/i2p.i2p
patch from 'kay" in #1653, dev agreement received
This commit is contained in:
@@ -18,10 +18,10 @@ public class RouterVersion {
|
||||
/** deprecated */
|
||||
public final static String ID = "Monotone";
|
||||
public final static String VERSION = CoreVersion.VERSION;
|
||||
public final static long BUILD = 4;
|
||||
public final static long BUILD = 5;
|
||||
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "";
|
||||
public final static String EXTRA = "-rc";
|
||||
public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;
|
||||
public static void main(String args[]) {
|
||||
System.out.println("I2P Router version: " + FULL_VERSION);
|
||||
|
@@ -184,6 +184,40 @@ public class JaxpParser extends Parser
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
/** @since 0.9.22 */
|
||||
@Override
|
||||
public int read(byte[] b) throws IOException {
|
||||
return this.read(b, 0, b.length);
|
||||
}
|
||||
|
||||
/** @since 0.9.22 */
|
||||
@Override
|
||||
public int read(byte[] b, int off, int len) throws IOException {
|
||||
if (b == null) {
|
||||
throw new NullPointerException();
|
||||
} else if (off < 0 || len < 0 || len > b.length - off) {
|
||||
throw new IndexOutOfBoundsException();
|
||||
} else if (len == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int rv = this.read();
|
||||
if (-1 == rv) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
int i = 1;
|
||||
b[off] = (byte) rv;
|
||||
for (; i < len; i++) {
|
||||
rv = this.read();
|
||||
if (-1 == rv) {
|
||||
break;
|
||||
}
|
||||
b[off + i] = (byte) rv;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user