Here you can find the source of cleanPath(String path)
Parameter | Description |
---|---|
path | string representation of path to clean up |
public static String cleanPath(String path)
//package com.java2s; //License from project: Open Source License public class Main { /**// w ww . j a v a 2s . c o m * replace questionable chars in path with percent representation * * @param path string representation of path to clean up * @return sanitized path */ public static String cleanPath(String path) { String s; s = path.replaceAll("#", "%23"); s = s.replaceAll(":", "%3A"); return s; } }