Change license to GNU GPL V2.
Copy PipedInputStream with minimal changes.

The changes are there in order to compile properly.