Package net.rim.device.api.io.file

Examples of net.rim.device.api.io.file.FileIOException


        FileConnectionWrapper fConnWrap = null;
        try {
            fConnWrap = new FileConnectionWrapper( args[ 0 ].toString() );

            if( !fConnWrap.exists() ) {
                throw new FileIOException( FileIOException.DIRECTORY_NOT_FOUND );
            }

            if( !fConnWrap.isDirectory() ) {
                throw new FileIOException( FileIOException.NOT_A_DIRECTORY );
            }

            if( args[ 1 ].toString().length() == 0 ) {
                throw new FileIOException( FileIOException.NOT_A_DIRECTORY );
            }

            fConnWrap.getFileConnection().rename( args[ 1 ].toString() );
        } finally {
            if( fConnWrap != null ) {
View Full Code Here


                try {
                    con.close();
                } catch( Exception e ) {
                }
            }
            throw new FileIOException( FileIOException.INVALID_PARAMETER );
        }
    }
View Full Code Here

        try {
            fConnWrap = new FileConnectionWrapper( args[ 0 ].toString() );

            if( !fConnWrap.exists() ) {
                throw new FileIOException( FileIOException.FILENAME_NOT_FOUND );
            }

            parentDir = "file://" + fConnWrap.getFileConnection().getPath();
        } finally {
            if( fConnWrap != null ) {
View Full Code Here

        FileConnectionWrapper fConnWrap = null;
        try {
            fConnWrap = new FileConnectionWrapper( args[ 0 ].toString() );

            if( !fConnWrap.exists() ) {
                throw new FileIOException( FileIOException.FILENAME_NOT_FOUND );
            }

            if( fConnWrap.isDirectory() ) {
                throw new FileIOException( FileIOException.NOT_A_FILE );
            }

            fConnWrap.getFileConnection().rename( args[ 1 ].toString() );
        } finally {
            if( fConnWrap != null ) {
View Full Code Here

        FileConnectionWrapper fConnWrap = null;
        try {
            fConnWrap = new FileConnectionWrapper( args[ 0 ].toString() );

            if( !fConnWrap.exists() ) {
                throw new FileIOException( FileIOException.DIRECTORY_NOT_FOUND );
            }
            if( !fConnWrap.isDirectory() ) {
                throw new FileIOException( FileIOException.NOT_A_DIRECTORY );
            }

            // Delete all the contents of the directory if the flag is set
            if( args.length > 1 && args[ 1 ] instanceof Boolean && args[ 1 ].toString().equals( "true" ) ) {
                deleteEntireDirectory( fConnWrap );
View Full Code Here

            dis = fconnWrapIn.openDataInputStream();

            fconnWrapOut = new FileConnectionWrapper( args[ 1 ].toString() );

            if( fconnWrapOut.isDirectory() ) {
                throw new FileIOException( FileIOException.NOT_A_FILE );
            }

            fconnWrapOut.create();
            dos = fconnWrapOut.openDataOutputStream();
View Full Code Here

        FileConnectionWrapper fConnWrap = null;
        try {
            fConnWrap = new FileConnectionWrapper( args[ 0 ].toString() );

            if( fConnWrap.isDirectory() ) {
                throw new FileIOException( FileIOException.NOT_A_FILE );
            }

            fConnWrap.delete();
        } finally {
            if( fConnWrap != null ) {
View Full Code Here

TOP

Related Classes of net.rim.device.api.io.file.FileIOException

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.