Package com.cloudhopper.commons.rfs

Examples of com.cloudhopper.commons.rfs.FileSystemException


    }

    public void copy(File srcFile, String filename) throws FileSystemException {
        // make sure the file exists
        if (!srcFile.exists()) {
            throw new FileSystemException("Source file " + srcFile.getName() + " does not exist");
        }

        // make sure we are permitted to read it
        if (!srcFile.canRead()) {
            throw new FileSystemException("Cannot read source file " + srcFile.getName() + " (permission denied?)");
        }

        // open an input stream
        FileInputStream in = null;
        try {
            in = new FileInputStream(srcFile);
        } catch (Exception e) {
            throw new FileSystemException("Unable to create input stream for file " + srcFile.getName(), e);
        }

        try {
            // delegate handling to input stream method
            copy(in, filename);
View Full Code Here

TOP

Related Classes of com.cloudhopper.commons.rfs.FileSystemException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.