wildfly/wildfly — pull request #5661 by bstansberry (2014-01-06 04:39:58+00:00)
Title: WFLY-2697 Base64 encode inter-process messages sent over stdin

IBM JDK 7 has issues on Windows with binary data sent by the ProcessController to a child process over stdin. Any byte whose high order bit is 1 (i.e. a negative signed byte) is garbled. It appears stdin is treated as a character stream and not a binary stream and there is some sort of encoding problem.

This patch avoids this problem by Base64 encoding all data sent via stdin.

I forked classes from commons-codec to do this. See the Base64 class, particularly the comment in its "decode" method for why I needed to fork it.