Java Path File Write nio srcImageToSavePath(String src, Path saveFolder)

Here you can find the source of srcImageToSavePath(String src, Path saveFolder)

Description

src Image To Save Path

License

Apache License

Declaration

public static Path srcImageToSavePath(String src, Path saveFolder) 

Method Source Code

//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);
    }
}

Related

  1. saveHeaders(Path path, ArrayList headers)
  2. saveProperties(Path filePath, Properties prop)
  3. saveTo(String path, InputStream in)
  4. saveToFile(String path, byte[] text)
  5. setPosixPermissions(String path, boolean ownerRead, boolean ownerWrite, boolean ownerExecute, boolean groupRead, boolean groupWrite, boolean groupExecute, boolean othersRead, boolean othersWrite, boolean othersExecute)
  6. write(List list, String outputPath)
  7. write(Object obj, String filePath)
  8. write(Path p)
  9. write(Path p, String s)