Java URL tools - encode and decode