本文整理汇总了Java中org.apache.commons.vfs2.FileSystemException.getMessage方法的典型用法代码示例。如果您正苦于以下问题:Java FileSystemException.getMessage方法的具体用法?Java FileSystemException.getMessage怎么用?Java FileSystemException.getMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.commons.vfs2.FileSystemException
的用法示例。
在下文中一共展示了FileSystemException.getMessage方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: checkScript
import org.apache.commons.vfs2.FileSystemException; //导入方法依赖的package包/类
private void checkScript()
{
long lastModified;
try
{
lastModified = VFSUtils.resolveFile(".", _scriptFile).getContent()
.getLastModifiedTime();
}
catch (FileSystemException e)
{
throw new IllegalArgumentException("Cannot find script "
+ _scriptFile + " ex=" + e.getMessage());
}
if (_lastModified == lastModified)
return;
else
{
_lastModified = lastModified;
_script = ScriptFactory.createScript(_scriptFile, _counterString,
null, _args, _log, 0, null, false, 0, 1);
if (_script == null)
throw new IllegalArgumentException("Cannot find script "
+ _scriptFile);
}
}
示例2: onChildrenChanged
import org.apache.commons.vfs2.FileSystemException; //导入方法依赖的package包/类
/**
* Called when the children of this file change.
*
* @param child the child
* @param newType the new type
*/
@Override
protected void onChildrenChanged(FileName child, FileType newType) {
if (children != null && newType.equals(FileType.IMAGINARY)) {
try {
children.remove(UriParser.decode(child.getBaseName()));
} catch (FileSystemException e) {
throw new RuntimeException(e.getMessage());
}
} else {
// if child was added we have to rescan the children
children = null;
}
}
示例3: getPidFiles
import org.apache.commons.vfs2.FileSystemException; //导入方法依赖的package包/类
private FileObject[] getPidFiles(Project project) throws URISyntaxException,
FileSystemException {
ZeppelinConfig zepConf = zeppelinConfFactory.getProjectConf(project.getName());
if(zepConf==null){
return new FileObject[0];
}
ZeppelinConfiguration conf = zepConf.getConf();
URI filesystemRoot;
FileSystemManager fsManager;
String runPath = conf.getRelativeDir("run");
try {
filesystemRoot = new URI(runPath);
} catch (URISyntaxException e1) {
throw new URISyntaxException("Not a valid URI", e1.getMessage());
}
if (filesystemRoot.getScheme() == null) { // it is local path
try {
filesystemRoot = new URI(new File(runPath).getAbsolutePath());
} catch (URISyntaxException e) {
throw new URISyntaxException("Not a valid URI", e.getMessage());
}
}
FileObject[] pidFiles = null;
try {
fsManager = VFS.getManager();
// pidFiles = fsManager.resolveFile(filesystemRoot.toString() + "/").
pidFiles = fsManager.resolveFile(filesystemRoot.getPath()).getChildren();
} catch (FileSystemException ex) {
throw new FileSystemException("Directory not found: " + filesystemRoot.
getPath(), ex.getMessage());
}
return pidFiles;
}