从一个路径中转换出空格隔开的结果
@param path
@return
326817
public static String parseResult(List<Vertex> path)
    {
        if (path.size() < 2)
        {
            throw new RuntimeException("路径节点数小于2:" + path);
        }
        StringBuffer sb = new StringBuffer();

        for (int i = 1; i < path.size() - 1; ++i)
        {
            Vertex v = path.get(i);
            sb.append(v.getRealWord() + " ");
        }

        return sb.toString();
    }
759569
public static String readAsString( String path ) {
		InputStream stream = openStream(path);
		if( stream == null ) {
			System.err.println("Failed to open "+path);
			return null;
		}
		return readAsString(stream);
	}
1230859
private Path relativePath(final Path path) {
		List<Path> pathList = new ArrayList<>();
		for (Path part : path) {
			pathList.add(part);
		}

		int loadPathSize = this.loadPathParts.length;

		// loadPathのフォルダの並びと一致する場所を特定し、その下を相対パスとして返却する
		for (int i = 0; i < pathList.size() - loadPathSize; i++) {
			String[] paths = pathList.subList(i, i + loadPathSize).stream().map(Path::toString)
					.collect(Collectors.toList()).toArray(new String[loadPathSize]);
			if (Arrays.equals(this.loadPathParts, paths)) {
				return path.subpath(i + loadPathSize, path.getNameCount());
			}
		}
		// loadPathと一致しなかった場合は元のpathを返却する
		return path;
	}
865583
public static Image load(String path)
  {
    BufferedImage image = null;

    try
    {
      InputStream in = ImageUtils.class.getClassLoader().getResourceAsStream(path);
      image = ImageIO.read(in);
      in.close();
    }
    catch (Exception e)
    {
      throw new RuntimeException("Could not load image with path: " + path, e);
    }

    return image;

  }
65590
static String canonicalPath(String path) {
        List<String> r = new ArrayList<String>(Arrays.asList(path.split("/+")));
        for (int i=0; i<r.size(); ) {
            if (r.get(i).length()==0 || r.get(i).equals(".")) {
                // empty token occurs for example, "".split("/+") is [""]
                r.remove(i);
            } else
            if (r.get(i).equals("..")) {
                // i==0 means this is a broken URI.
                r.remove(i);
                if (i>0) {
                    r.remove(i-1);
                    i--;
                }
            } else {
                i++;
            }
        }

        StringBuilder buf = new StringBuilder();
        if (path.startsWith("/"))
            buf.append('/');
        boolean first = true;
        for (String token : r) {
            if (!first)     buf.append('/');
            else            first = false;
            buf.append(token);
        }
        // translation: if (path.endsWith("/") && !buf.endsWith("/"))
        if (path.endsWith("/") && (buf.length()==0 || buf.charAt(buf.length()-1)!='/'))
            buf.append('/');
        return buf.toString();
    }
1337677
public static String separatorsToSystem(final String path) {
        if (path == null) {
            return null;
        }
        if (IOUtil.IS_OS_WINDOWS) {
            return separatorsToWindows(path);
        } else {
            return separatorsToUnix(path);
        }
    }
29986
public static Properties loadProperties(String path){
        ClassLoader cl = Thread.currentThread().getContextClassLoader();
        InputStream in = null;
        try {
            in = cl.getResourceAsStream(path);

            Properties properties = new Properties();
            properties.load(in);

            return properties;

        } catch(IOException ex){
            return null;

        } finally {
            IOUtil.closeQuietly(in);
        }
    }
112864
public FTPFile[] lsFiles(String path){
		String pwd = null;
		if(StrUtil.isNotBlank(path)) {
			pwd = pwd();
			cd(path);
		}
		
		FTPFile[] ftpFiles;
		try {
			ftpFiles = this.client.listFiles();
		} catch (IOException e) {
			throw new FtpException(e);
		}
		
		if(StrUtil.isNotBlank(pwd)) {
			// 回到原目录
			cd(pwd);
		}
		
		return ftpFiles;
	}
1214319
public static String dirpart(final String path) {
        int s = path.lastIndexOf(File.separatorChar);
        if (s != -1) {
            return path.substring(0, s);
        } else {
            return null;
        } 
    }
1239604
public Optional<URL> getResource(String path) {
        boolean isDirectory = isDirectory(path);

        if (!isDirectory) {
            URL url = classLoader.getResource(prefixPath(path));
            return Optional.ofNullable(url);
        }
        return Optional.empty();
    }
820034
private String read(String path) throws IOException {
        StringBuffer sb = new StringBuffer();
        String tempStr;
        File file = new File(path);
        // 如果文件不存在，读取失败
        if (!file.exists()) throw new FileNotFoundException();
        FileInputStream fis = new FileInputStream(file);
        BufferedReader br = new BufferedReader(new InputStreamReader(fis));
        while ((tempStr = br.readLine()) != null) sb.append(tempStr);
        return sb.toString();
    }
798133
public static String getNodeFromPath(String path)
    {
        PathUtils.validatePath(path);
        int i = path.lastIndexOf(PATH_SEPARATOR);
        if ( i < 0 )
        {
            return path;
        }
        if ( (i + 1) >= path.length() )
        {
            return "";
        }
        return path.substring(i + 1);
    }
964938
public static List<String> split(String path)
    {
        PathUtils.validatePath(path);
        return PATH_SPLITTER.splitToList(path);
    }
86411
public static String getNullableString(final List list, final Integer... path) {
        return getNullable(list, String.class, path);
    }
1218113
public static boolean isAbsolutePath(String path) {
		if (StrUtil.isEmpty(path)) {
			return false;
		}

		if (StrUtil.C_SLASH == path.charAt(0) || path.matches("^[a-zA-Z]:[/\\\\].*")) {
			// 给定的路径已经是绝对路径了
			return true;
		}
		return false;
	}
149160
public static String[] getPathComponents(String path) throws InvalidPathException {
    path = cleanPath(path);
    if (isRoot(path)) {
      return new String[]{""};
    }
    return path.split(AlluxioURI.SEPARATOR);
  }
48714
@SuppressWarnings("unchecked")
  public <T> T get(String... path) {
    ExtensionAware root = searchRoot;
    for (String name : path) {
      ExtensionContainer children = root.getExtensions();
      root = (ExtensionAware) children.getByName(name);
    }
    return (T) root; // this is potentially unchecked.
  }