将网络地址转换为硬盘地址(改前缀)
/*
* 测试替换的方法*/
package com.siyann.test;
public class TestReplace {
public static void main(String[] args) {
String filePath = "http://192.168.1.108:8080/Ueditor/allhtml/72059012-3c57-4076-a61b-529866b3242e/72059012-3c57-4076-a61b-529866b3242e.html";
String a = filePath.replace(
"http://192.168.1.108:8080/Ueditor/allhtml/",
"C:/Program Files/Apache Software Foundation/Tomcat 7.0/webapps/Ueditor/allhtml/");
System.out.println(a);
}
}