Example usage for org.apache.commons.vfs2 FileSystemException getMessage

List of usage examples for org.apache.commons.vfs2 FileSystemException getMessage

Introduction

In this page you can find the example usage for org.apache.commons.vfs2 FileSystemException getMessage.

Prototype

@Override
public String getMessage() 

Source Link

Document

Retrieves message from bundle.

Usage

From source file:pl.otros.logview.api.io.Utils.java

public static void closeQuietly(FileObject fileObject) {

    if (fileObject != null) {
        String friendlyURI = fileObject.getName().getFriendlyURI();
        try {//from w w  w  .  j  a  v a 2  s.  c  om
            LOGGER.info(String.format("Closing file %s", friendlyURI));
            fileObject.close();
            LOGGER.info(String.format("File %s closed", friendlyURI));
        } catch (FileSystemException ignore) {
            LOGGER.error(String.format("File %s is not closed: %s", friendlyURI, ignore.getMessage()));
        }
    }
}

From source file:pl.otros.logview.io.Utils.java

public static void closeQuietly(FileObject fileObject) {

    if (fileObject != null) {
        String friendlyURI = fileObject.getName().getFriendlyURI();
        try {/*w  w  w  . j a v  a 2s .  c om*/
            LOGGER.info(String.format("Closing file %s", friendlyURI));
            fileObject.close();
            LOGGER.info(String.format("File %s closed", friendlyURI));
        } catch (FileSystemException ignore) {
            LOGGER.info(String.format("File %s is not closed: %s", friendlyURI, ignore.getMessage()));
        }
    }
}