本文整理了Java中slash.common.io.Files.createReadablePath()
方法的一些代码示例,展示了Files.createReadablePath()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Files.createReadablePath()
方法的具体详情如下:
包路径:slash.common.io.Files
类名称:Files
方法名:createReadablePath
暂无
代码示例来源:origin: cpesch/RouteConverter
public static String createReadablePath(URL url) {
File file = toFile(url);
if (file != null)
return createReadablePath(file);
return url.toExternalForm();
}
代码示例来源:origin: cpesch/RouteConverter
textFieldFile.setText(createReadablePath(file));
if (length != null)
textFieldLength.setText(formatDoubleAsString(length / METERS_OF_A_KILOMETER, 1));
代码示例来源:origin: cpesch/RouteConverter
for (File target : targets) {
if (target.exists()) {
String path = createReadablePath(target);
if (confirmOverwrite(path))
return;
代码示例来源:origin: cpesch/RouteConverter
String path = createReadablePath(url);
urlModel.setString(path);
recentUrlsModel.addUrl(url);
代码示例来源:origin: cpesch/RouteConverter
private void addFileToCatalog(CategoryTreeNode categoryTreeNode, File file) {
RouteConverter r = RouteConverter.getInstance();
String path = createReadablePath(file);
String description = null;
Double length = null;
try {
NavigationFormatParser parser = new NavigationFormatParser(new NavigationFormatRegistry());
ParserResult result = parser.read(file);
if (result.isSuccessful()) {
BaseRoute<BaseNavigationPosition, BaseNavigationFormat> route = result.getTheRoute();
if (route != null) {
description = createRouteDescription(route);
length = route.getDistance();
}
showAddFileToCatalog(categoryTreeNode, description, length, file);
} else
r.handleUnsupportedFormat(path);
} catch (BabelException e) {
r.handleBabelError(e);
} catch (OutOfMemoryError e) {
handleOutOfMemoryError(e);
} catch (FileNotFoundException e) {
r.handleFileNotFound(path);
} catch (Throwable t) {
log.severe(String.format("Cannot parse description from route %s: %s", path, t));
r.handleOpenError(t, path);
}
}
代码示例来源:origin: cpesch/RouteConverter
final String path = createReadablePath(url);
preferences.put(READ_PATH_PREFERENCE, path);
代码示例来源:origin: cpesch/RouteConverter
try {
for (URL url : urls) {
String path = createReadablePath(url);
内容来源于网络,如有侵权,请联系作者删除!