what is encodeURL() method? when to use it?

what is encoderedirectURL() method? when to use it?


please let me know