Here you can find the source of srcImageToSavePath(String src, Path saveFolder)
public static Path srcImageToSavePath(String src, Path saveFolder)
//package com.java2s; //License from project: Apache License import java.nio.file.Path; public class Main { public static Path srcImageToSavePath(String src, Path saveFolder) { // Extract the name of the image from the src attribute. int indexName = src.lastIndexOf("/"); if (indexName == src.length()) { src = src.substring(1, indexName + 1); }//from ww w .jav a2s.co m indexName = src.lastIndexOf("/") + 1; String name = src.substring(indexName, src.length()); return saveFolder.resolve(name); } }