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

📄 r.java

📁 经过反编译和部分代码修改后的ultraimpro java源代码。可在netbean环境下成功编译。供学习和分析用。
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
// Decompiled by DJ v3.9.9.91 Copyright 2005 Atanas Neshkov  Date: 2006-5-1 19:31:43
// Home Page : http://members.fortunecity.com/neshkov/dj.html  - Check often for new version!
// Decompiler options: packimports(3) 

import java.io.InputStream;
import java.util.Enumeration;
import javax.microedition.io.Connector;
import javax.microedition.io.file.FileConnection;
import javax.microedition.io.file.FileSystemRegistry;
import javax.microedition.lcdui.*;
import javax.microedition.rms.RecordStore;

public final class r
    implements CommandListener, an
{

    public r(int i, int j, Displayable displayable, bd bd)
    {
        a_byte_array1d_fld = null;
        a_javax_microedition_lcdui_Command_fld = new Command("UP", 1, 1);
        a_int_fld = i;
        b_int_fld = j;
        a_javax_microedition_lcdui_Displayable_fld = displayable;
        a_bd_fld = bd;
    }

    public final void a()
    {
        c_java_lang_String_fld = "/";
        (new Thread(new ak(this))).start();
    }

    public final void b()
    {
        FileConnection fileconnection = null;
        int i = 0;
        Enumeration enumeration;
        List list;
        try
        {
        if("/".equals(c_java_lang_String_fld))
        {
            enumeration = FileSystemRegistry.listRoots();
            i = (list = new List(c_java_lang_String_fld, 3)).size();
        } else
        {
            enumeration = (fileconnection = (FileConnection)Connector.open("file://localhost/" + c_java_lang_String_fld)).list();
            list = null;
            (list = new List(c_java_lang_String_fld, 3)).append("..", w.k);
            i = list.size();
        }
        String s;
        while(enumeration.hasMoreElements()) 
            if((s = (String)enumeration.nextElement()).charAt(s.length() - 1) == '/')
            {
                if(i >= list.size())
                {
                    list.append(s, w.k);
                    i++;
                } else
                {
                    list.insert(i, s, w.k);
                    i++;
                }
            } else
            {
                list.append(s, w.l);
            }
        list.addCommand(UltraIMPro.i_CommandOpen);
        list.addCommand(a_javax_microedition_lcdui_Command_fld);
        list.addCommand(UltraIMPro.f_CommandBack);
        list.setSelectCommand(UltraIMPro.i_CommandOpen);
        list.setCommandListener(this);
        UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(list);
        }
        catch(Exception _ex) { return;}

        try
        {
            if(fileconnection != null)
                fileconnection.close();
        }
        catch(Exception _ex) { return;}
        //return;
        //JVM INSTR pop ;
        a("..", false);
        Alert alert;
        (alert = new Alert("Error", "You are not authorized to access file system, check Java Application permission settings.", null, AlertType.ERROR)).setTimeout(-2);
        UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(alert);
        try
        {
            if(fileconnection != null)
                fileconnection.close();
        }
        catch(Exception _ex) {return; }
        //return;
        //JVM INSTR pop ;
        a("..", false);
        Alert alert1;
        (alert1 = new Alert("Error", "Can't access directory", null, AlertType.ERROR)).setTimeout(-2);
        UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(alert1);
        try
        {
            if(fileconnection != null)
                fileconnection.close();
        }
        catch(Exception _ex) { return;}
        //return;
        //Exception exception;
        //exception;
        try
        {
            if(fileconnection != null)
                fileconnection.close();
        }
        catch(Exception _ex) { return;}
        //throw exception;
    }

    public final void commandAction(Command command, Displayable displayable)
    {
        if(command == UltraIMPro.i_CommandOpen)
        {
            List list;
            String s = (list = (List)displayable).getString(list.getSelectedIndex());
            a(s);
            return;
        }
        if(command == a_javax_microedition_lcdui_Command_fld)
        {
            a("..");
            return;
        }
        if(command == UltraIMPro.f_CommandBack)
        {
            UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(a_javax_microedition_lcdui_Displayable_fld);
            return;
        }
        if(command == UltraIMPro.g_CommandCancel)
            if(b_int_fld == 5)
            {
                f();
                return;
            } else
            {
                UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(a_javax_microedition_lcdui_Displayable_fld);
                return;
            }
        if(command == UltraIMPro.c_CommandSet)
        {
            UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(new bk(this, "Are you sure to SET this image as your display picture?\r\nNote: Receivers need to open conversation window to view your updated picture. Once the picture is transferred it won't be transferred again, because receivers have cached the picture, just like real MSN does", 0));
            return;
        }
        if(command == UltraIMPro.G_CommandSend)
        {
            e();
            return;
        }
        if(command == UltraIMPro.o_CommandSave)
        {
            d();
            return;
        }
        if(command == UltraIMPro.d_CommandSetSave || command == UltraIMPro.e_CommandSendSave)
        {
            a_boolean_fld = false;
            d();
            try
            {
                while(!a_boolean_fld) 
                    Thread.sleep(200L);
            }
            catch(Exception _ex) { }
            if(c_int_fld != 1)
                if(a_int_fld == 0)
                {
                    UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(new bk(this, "Are you sure to SET this image as your display picture?\r\nNote: Receivers need to open conversation window to view your updated picture. Once the picture is transferred it won't be transferred again, because receivers have cached the picture, just like real MSN does", 0));
                    return;
                } else
                {
                    e();
                    return;
                }
            UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(new bk(this, "Album can't store more than 5 photos, press 'OK' to edit album first", 0));
        }
    }

    public final void a(String s)
    {
        String s1 = s;
        (new Thread(new q(this, s1))).start();
    }

    public final void a(String s, boolean flag)
    {
        int i;
        if(c_java_lang_String_fld.equals("/"))
        {
            if(s.equals(".."))
                return;
            c_java_lang_String_fld = s;
        } else
        if(s.equals(".."))
        {
            if((i = c_java_lang_String_fld.lastIndexOf('/', c_java_lang_String_fld.length() - 2)) != -1)
                c_java_lang_String_fld = c_java_lang_String_fld.substring(0, i + 1);
            else
                c_java_lang_String_fld = "/";
        } else
        {
            c_java_lang_String_fld = c_java_lang_String_fld + s;
        }
        if(flag)
            b();
    }

    public final void b(String s)
    {
        FileConnection fileconnection;
        InputStream inputstream;
        int i;
        fileconnection = null;
        inputstream = null;
        try
        {
            if(!(fileconnection = (FileConnection)Connector.open("file://localhost/" + c_java_lang_String_fld + s)).exists())
            {
                try
                {
                    fileconnection.close();
                }
                catch(Exception _ex) { }
                Alert alert;
                (alert = new Alert("", "Can't access file ", null, AlertType.ERROR)).setTimeout(-2);
                UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(alert);
                return;
            }
        }
        catch(Exception _ex)
        {
            try
            {
                if(inputstream != null)
                    inputstream.close();
                if(fileconnection != null)
                    fileconnection.close();
            }
            catch(Exception _ex2) { }
            Alert alert1;
            (alert1 = new Alert("", "Can't access file ", null, AlertType.ERROR)).setTimeout(-2);
            UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(alert1);
            return;
        }
        try
        {
        i = (int)fileconnection.fileSize();
        inputstream = fileconnection.openInputStream();
        }
        catch (Exception _ex2) { return;}
        
        if(a_int_fld == 0)
        {
            Image image = null;
            try
            {
                image = Image.createImage(inputstream);
                a_java_lang_String_fld = i + "/" + s;
            }
            catch(OutOfMemoryError _ex)
            {
                try
                {
                    if(inputstream != null)
                        inputstream.close();
                    if(fileconnection != null)
                        fileconnection.close();
                }
                catch(Exception _ex2) { }
                Alert alert2;
                (alert2 = new Alert("", "The image is too large to display, maximum size is 640*480", null, AlertType.INFO)).setTimeout(-2);
                UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(alert2);
                return;
            }
            catch(Exception _ex)
            {
                try
                {
                    if(inputstream != null)
                        inputstream.close();
                    if(fileconnection != null)
                        fileconnection.close();
                }
                catch(Exception _ex2) { }
                Alert alert3;
                (alert3 = new Alert("", "Can't display this image ", null, AlertType.ERROR)).setTimeout(-2);
                UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(alert3);
                return;
            }
            try
            {
                if(inputstream != null)
                    inputstream.close();
                if(fileconnection != null)
                    fileconnection.close();
            }
            catch(Exception _ex) { }
            a(image);
            return;
        }
        if(a_int_fld == 1)
        {
            d = i;
            b_java_lang_String_fld = s;
            a_javax_microedition_io_file_FileConnection_fld = fileconnection;
            a_java_io_InputStream_fld = inputstream;
            e();
        }
        return;
    }

    public final void a(Image image)
    {
        int i = image.getWidth();
        int j = image.getHeight();
        char c1 = '\0';
        if(a_int_fld == 0)
            c1 = '`';
        else
            c1 = '\240';
        if((image = x.a(image, i, j, c1)) == null)
        {
            Alert alert;
            (alert = new Alert("", "The image is too large to display, maximum size is 640*480", null, AlertType.INFO)).setTimeout(-2);
            UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(alert);

⌨️ 快捷键说明

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