1 28 29 package org.apache.commons.transaction.file; 30 31 import java.io.UnsupportedEncodingException ; 32 import java.net.URLEncoder ; 33 34 39 public class JDK14URLEncodeIdMapper implements ResourceIdToPathMapper { 40 public String getPathForId(Object resourceId) { 41 String path = resourceId.toString(); 42 try { 43 path = URLEncoder.encode(path, "UTF-8"); 44 } catch (UnsupportedEncodingException e) { 45 } 47 return path; 48 } 49 } | Popular Tags |