I used the Java one, guessing it might be faster, although I didn't check. For tidiness I'd prefer this code and UriEncoding use the same type of BitSet (I don't mind which). Since both are new bits of code, written within a few weeks of each other, I think we should be consistent. :)

If you want to make them use the same BitSet in this PR that would be great, otherwise perhaps you could create an issue to fix it up and assign to me?