<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
- /**
- *
- * @param path
- * @return
- */
- public static String toJavaFilePath(String path) {
- String FILE_SEPERATOR = "/";
- if (path == null) {
- return null;
- }
- path = StringUtils.replace(path, "//", FILE_SEPERATOR);
- path = StringUtils.replace(path, "////", FILE_SEPERATOR);
- path = StringUtils.replace(path, "//////", FILE_SEPERATOR);
- path = StringUtils.replace(path, "////////", FILE_SEPERATOR);
- path = StringUtils.replace(path, "/", FILE_SEPERATOR);
- path = StringUtils.replace(path, "//", FILE_SEPERATOR);
- path = StringUtils.replace(path, "///", FILE_SEPERATOR);
- path = StringUtils.replace(path, "////", FILE_SEPERATOR);
- path = StringUtils.replace(path, "${FILE_SEPERATOR}", FILE_SEPERATOR);
- return path;
- }
- /**
- *
- * @param path
- * @return
- */
- public static String toWebFilePath(String path) {
- if (path == null) {
- return null;
- }
- path = StringUtils.replace(path, "//", "/");
- path = StringUtils.replace(path, "////", "/");
- path = StringUtils.replace(path, "//////", "/");
- path = StringUtils.replace(path, "////////", "/");
- path = StringUtils.replace(path, "//", "/");
- path = StringUtils.replace(path, "///", "/");
- path = StringUtils.replace(path, "////", "/");
- path = StringUtils.replace(path, "${FILE_SEPERATOR}", "/");
- return path;
- }