2 package org
.de
.metux
.util
;
6 public static String
encode(String s
)
8 // escape the % character at first
9 s
= StrReplace
.replace("%","%25", s
);
11 // now the other chars
12 s
= StrReplace
.replace(":", "%3A",
13 StrReplace
.replace("/", "%2F", s
));
17 public static String
decode(String s
)
19 // System.err.println("decoding string: "+s);
22 StrReplace
.replace("%3A", ":",
23 StrReplace
.replace("%2F", "/",
24 StrReplace
.replace("%25", "%", s
)));