当前位置: 首页>>代码示例>>Java>>正文


Java FileSystemException.printStackTrace方法代码示例

本文整理汇总了Java中org.apache.commons.vfs2.FileSystemException.printStackTrace方法的典型用法代码示例。如果您正苦于以下问题:Java FileSystemException.printStackTrace方法的具体用法?Java FileSystemException.printStackTrace怎么用?Java FileSystemException.printStackTrace使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.commons.vfs2.FileSystemException的用法示例。


在下文中一共展示了FileSystemException.printStackTrace方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getConfiguration

import org.apache.commons.vfs2.FileSystemException; //导入方法依赖的package包/类
public Configuration getConfiguration()
{
	if (_config == null)
	{
		Map utils = new HashMap();
		utils.put("util", new Utils(this));
		try
		{
			VFSUtils.init();
		}
		catch (FileSystemException e)
		{
			e.printStackTrace();
		}

		_config = new YajswConfigurationImpl(_localConfiguration,
				_useSystemProperties, utils);
	}
	return _config;
}
 
开发者ID:yajsw,项目名称:yajsw,代码行数:21,代码来源:AbstractWrappedProcess.java

示例2: fileExists

import org.apache.commons.vfs2.FileSystemException; //导入方法依赖的package包/类
private boolean fileExists(String file)
{
	try
	{
		// this hack is no longer required, changed VFS to init without
		// providers.xm.
		// String current =
		// System.getProperty("javax.xml.parsers.DocumentBuilderFactory");
		// System.setProperty("javax.xml.parsers.DocumentBuilderFactory",
		// "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl");
		DefaultFileSystemManager fsManager = (DefaultFileSystemManager) VFS
				.getManager();
		// if (current != null)
		// System.setProperty("javax.xml.parsers.DocumentBuilderFactory",
		// current);
		// else
		// System.clearProperty("javax.xml.parsers.DocumentBuilderFactory");
		FileObject f = VFSUtils.resolveFile(".", file);
		return f.exists();
	}
	catch (FileSystemException e)
	{
		e.printStackTrace();
		return false;
	}
}
 
开发者ID:yajsw,项目名称:yajsw,代码行数:27,代码来源:YajswConfigurationImpl.java

示例3: start

import org.apache.commons.vfs2.FileSystemException; //导入方法依赖的package包/类
/**
 * Starts watching the file system for changes to trigger a bake.
 *
 * @param res Commandline options
 * @param config Configuration settings
 */
public void start(final LaunchOptions res, CompositeConfiguration config) {
    try {
        FileSystemManager fsMan = VFS.getManager();
        FileObject listenPath = fsMan.resolveFile(res.getSource(), config.getString( ConfigUtil.Keys.CONTENT_FOLDER));

        System.out.println("Watching for changes in [" + res.getSource() + "]");
        DefaultFileMonitor monitor = new DefaultFileMonitor(new CustomFSChangeListener(res, config));
        monitor.setRecursive(true);
        monitor.addFile(listenPath);
        monitor.start();
    } catch (FileSystemException e) {
        e.printStackTrace();
    }
}
 
开发者ID:ghaseminya,项目名称:jbake-rtl-jalaali,代码行数:21,代码来源:BakeWatcher.java

示例4: fileChanged

import org.apache.commons.vfs2.FileSystemException; //导入方法依赖的package包/类
private boolean fileChanged(FileObject source, FileObject destination)
{
	try
	{
		return !destination.exists()
				|| source.getContent().getLastModifiedTime() == 0
				|| source.getContent().getLastModifiedTime() != destination
						.getContent().getLastModifiedTime();
	}
	catch (FileSystemException e)
	{
		e.printStackTrace();
		return true;
	}
}
 
开发者ID:yajsw,项目名称:yajsw,代码行数:16,代码来源:Cache.java

示例5: getFileName

import org.apache.commons.vfs2.FileSystemException; //导入方法依赖的package包/类
public String getFileName()
{
	//return _fileName;
	try {
		return VFSUtils.resolveFile(".", _fileName).getName().getBaseName();
	} catch (FileSystemException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
	return _fileName;
}
 
开发者ID:yajsw,项目名称:yajsw,代码行数:12,代码来源:FilePropertiesConfiguration.java

示例6: getLastModifiedTime

import org.apache.commons.vfs2.FileSystemException; //导入方法依赖的package包/类
public static long getLastModifiedTime(FileObject file)
{
	try
	{
		return file.getContent().getLastModifiedTime();
	}
	catch (FileSystemException e)
	{
		e.printStackTrace();
		return 0;
	}
}
 
开发者ID:yajsw,项目名称:yajsw,代码行数:13,代码来源:VFSUtils.java

示例7: isLocal

import org.apache.commons.vfs2.FileSystemException; //导入方法依赖的package包/类
public static boolean isLocal(FileObject f)
{
	if (f instanceof OnCallRefreshFileObject)
		try
		{
			return f.getContent().getFile() instanceof LocalFile;
		}
		catch (FileSystemException e)
		{
			e.printStackTrace();
		}
	return f instanceof LocalFile;
}
 
开发者ID:yajsw,项目名称:yajsw,代码行数:14,代码来源:VFSUtils.java

示例8: getHighestStoredID

import org.apache.commons.vfs2.FileSystemException; //导入方法依赖的package包/类
public synchronized int getHighestStoredID() {
    int found = 0;
    try {
        String max;
        max = findMaxID(baseDirectory, 0);
        if (max != null) {
            found = slot2id(max);
        }
    } catch (final FileSystemException e) {
        e.printStackTrace();
    }
    return found;
}
 
开发者ID:MyCoRe-Org,项目名称:mycore,代码行数:14,代码来源:MCRStore.java

示例9: isEmpty

import org.apache.commons.vfs2.FileSystemException; //导入方法依赖的package包/类
public boolean isEmpty() {
    try {
        return baseDirectory.getChildren().length == 0;
    } catch (final FileSystemException e) {
        e.printStackTrace();
    }

    return false;
}
 
开发者ID:MyCoRe-Org,项目名称:mycore,代码行数:10,代码来源:MCRStore.java

示例10: close

import org.apache.commons.vfs2.FileSystemException; //导入方法依赖的package包/类
@Override
public void close(FileObject fileObject) {
    try {
        fileObject.close();
    } catch (FileSystemException e) {
        e.printStackTrace();
    }
}
 
开发者ID:geetools,项目名称:geeCommerce-Java-Shop-Software-and-PIM,代码行数:9,代码来源:DefaultVfsHelper.java

示例11: getAuthenticationData

import org.apache.commons.vfs2.FileSystemException; //导入方法依赖的package包/类
@Override
protected void getAuthenticationData(UserAuthenticationData authenticationData) {
  super.getAuthenticationData(authenticationData);
  authenticationData.setData(UserAuthenticationDataWrapper.SSH_KEY, sshKeyFileField.getText().trim().toCharArray());

  if (StringUtils.isNotBlank(sshKeyFileField.getText())) {
    try {
      SftpFileSystemConfigBuilder.getInstance().setIdentities(getFileSystemOptions(), new File[]{new File(sshKeyFileField.getText())});
      //TODO set user auth data file path
    } catch (FileSystemException e) {
      e.printStackTrace();
    }
  }

}
 
开发者ID:otros-systems,项目名称:otroslogviewer,代码行数:16,代码来源:SftpUserAuthenticator.java

示例12: fileNameString

import org.apache.commons.vfs2.FileSystemException; //导入方法依赖的package包/类
private String fileNameString(FileObject fileObject)
{
    if (fileObject == null)
    {
        return null;
    }
    else
    {
        VFSJFileChooser fc = getFileChooser();

        if ((fc.isDirectorySelectionEnabled() &&
                !fc.isFileSelectionEnabled()) ||
                (fc.isDirectorySelectionEnabled() &&
                fc.isFileSelectionEnabled() &&
                fc.getFileSystemView().isFileSystemRoot(fileObject)))
        {
            String url = null;

            try
            {
                url = fileObject.getURL().toExternalForm();
            }
            catch (FileSystemException ex)
            {
                ex.printStackTrace();
            }

            return url;
        }
        else
        {
            return fileObject.getName().getBaseName();
        }
    }
}
 
开发者ID:fracpete,项目名称:vfsjfilechooser2,代码行数:36,代码来源:MetalVFSFileChooserUI.java

示例13: doDirectoryChanged

import org.apache.commons.vfs2.FileSystemException; //导入方法依赖的package包/类
private void doDirectoryChanged(PropertyChangeEvent e)
{
    VFSJFileChooser fc = getFileChooser();
    AbstractVFSFileSystemView fsv = fc.getFileSystemView();

    clearIconCache();

    FileObject currentDirectory = fc.getCurrentDirectoryObject();

    if (currentDirectory != null)
    {
        directoryComboBoxModel.addItem(currentDirectory);
        directoryComboBox.setSelectedItem(currentDirectory);
        fc.setCurrentDirectoryObject(currentDirectory);

        if (fc.isDirectorySelectionEnabled() &&
                !fc.isFileSelectionEnabled())
        {
            if (fsv.isFileSystem(currentDirectory))
            {
                String url = null;

                try
                {
                    url = currentDirectory.getURL().toExternalForm();
                }
                catch (FileSystemException e1)
                {
                    e1.printStackTrace();
                }

                setFileName(url);
            }
            else
            {
                setFileName(null);
            }
        }
    }
}
 
开发者ID:fracpete,项目名称:vfsjfilechooser2,代码行数:41,代码来源:MetalVFSFileChooserUI.java

示例14: doFileSelectionModeChanged

import org.apache.commons.vfs2.FileSystemException; //导入方法依赖的package包/类
private void doFileSelectionModeChanged(PropertyChangeEvent e)
{
    if (fileNameLabel != null)
    {
        populateFileNameLabel();
    }

    clearIconCache();

    VFSJFileChooser fc = getFileChooser();
    FileObject currentDirectory = fc.getCurrentDirectoryObject();

    if ((currentDirectory != null) && fc.isDirectorySelectionEnabled() &&
            !fc.isFileSelectionEnabled() &&
            fc.getFileSystemView().isFileSystem(currentDirectory))
    {
        String url = null;

        try
        {
            url = currentDirectory.getURL().toExternalForm();
        }
        catch (FileSystemException e1)
        {
            e1.printStackTrace();
        }

        setFileName(url);
    }
    else
    {
        setFileName(null);
    }
}
 
开发者ID:fracpete,项目名称:vfsjfilechooser2,代码行数:35,代码来源:MetalVFSFileChooserUI.java


注:本文中的org.apache.commons.vfs2.FileSystemException.printStackTrace方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。