Java: case insensitive checking for encoded url

Java equivalency to DotNet #120