diff -r b20ead86892f -r 388e48c0a37a emul/src/main/java/java/io/PushbackInputStream.java --- a/emul/src/main/java/java/io/PushbackInputStream.java Sat Nov 10 17:38:35 2012 +0100 +++ b/emul/src/main/java/java/io/PushbackInputStream.java Wed Jan 23 20:16:48 2013 +0100 @@ -177,7 +177,7 @@ if (len < avail) { avail = len; } - System.arraycopy(buf, pos, b, off, avail); + arraycopy(buf, pos, b, off, avail); pos += avail; off += avail; len -= avail; @@ -232,7 +232,7 @@ throw new IOException("Push back buffer is full"); } pos -= len; - System.arraycopy(b, off, buf, pos, len); + arraycopy(b, off, buf, pos, len); } /** @@ -380,4 +380,9 @@ in = null; buf = null; } + static void arraycopy(byte[] value, int srcBegin, byte[] dst, int dstBegin, int count) { + while (count-- > 0) { + dst[dstBegin++] = value[srcBegin++]; + } + } }