View Javadoc

1   package org.paneris.util;
2   import java.io.UnsupportedEncodingException;
3   import java.net.URLEncoder;
4   
5   public class ContextUtil extends Object {
6   
7       public ContextUtil() {
8       }
9   
10      public String encode(String url) {
11          String r = null;
12          try {
13            r = URLEncoder.encode(url,"UTF-8");
14          } catch (UnsupportedEncodingException e) {
15            throw new RuntimeException(e);
16          }
17          return r;
18      }
19  
20      public Integer increment(Integer a) {
21          return new Integer(a.intValue() +1);
22      }
23  }