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

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


        FileConnectionWrapper fConnWrap = null;
        FilePropertiesObject fileProObj = null;

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

            Boolean isReadonly = new Boolean( !fConn.canWrite() );
            Boolean isHidden = new Boolean( fConn.isHidden() );
            Double size = new Double( fConn.fileSize() );
            Date dateModified = new Date( fConn.lastModified() );

            int dotIndex = ( args[ 0 ].toString() ).lastIndexOf( (int) '.' );
            String fileExtension = "";
            if( dotIndex >= 0 ) {
                fileExtension = ( args[ 0 ].toString() ).substring( dotIndex );
            }

            String directory = "file://" + fConn.getPath();
            String mimeType = MIMETypeAssociations.getMIMEType( fConn.getName() );
            if( mimeType == null ) {
                mimeType = "";
            }

            // get the character encoding by scanning the first 2-4 bytes
View Full Code Here

TOP

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

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.