⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 provider.java

📁 J2ME上的一个播放器,可以更换皮肤.开源软件.
💻 JAVA
字号:
// Generic provider class for filesystem operations

package inline.fs;

import inline.fs.*;

    public class Provider
    {
        private static FileAccessible fileSystem; 
	private static final String supportedFileSystems[] = {
						 "javax.microedition.io.file.FileConnection",
                                                 "com.motorola.io.FileConnection",
                                                 "com.motorola.io.file.FileConnection"
					};
        
	
	
        static
        {
            fileSystem = null;   
	    Class bx = null;
					
            for(int i=0;i<supportedFileSystems.length && fileSystem==null;i++) 
            {
                try
                {
                    Class x = Class.forName((String)supportedFileSystems[i]);
		    
		    // weird? 
		    // it's for proper obfuscation...
		    switch (i) 
		    {
			case 0:
			    bx = Class.forName("inline.fs.JSR");
			    break;
			case 1:
			    bx = Class.forName("inline.fs.Moto");
			    break;
			case 2:
			    bx = Class.forName("inline.fs.MotoE1E3");
			    break;
		    }
                    
                    try
                    {
                        fileSystem = (FileAccessible)bx.newInstance();
                    }
                    catch(Exception e) 
                    {
                        System.err.println("Can't instance class");
                    }
                }
                catch(Exception e)
                {
                    //System.err.println(e);
                    // no lack with this class
                }
            }
            
            if (fileSystem == null)
            {
                System.err.println("Can't find filesystem access class");
            }
        }
        
        public static FileAccessible access()
        {
            return fileSystem;
        }
        
        public static FileAccessible newfs()
        {
            FileAccessible newfs = null;
            try
            {  
                newfs = (FileAccessible)fileSystem.getClass().newInstance();
            }
            catch(Exception e)
            {
                 System.err.println("Can't instance clone class");
            }
            return newfs;
        }

        public static boolean valid()
        {
            return (fileSystem != null);
        }
    }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -