Fix #827: Implement java.net.URI

Could you
* make `in` be the first parameter, and `res` the second
* rename `res` to `resReverse` or something else that makes it clear that it is in the reverse order