Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so dont bother with any of their useless mail servers here and just use oauth login instead. Thank the nice Russians for causing that. :)

Paste

Pasted as Java by proud_anon ( 16 years ago )
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Form;
import javax.microedition.lcdui.List;
import javax.microedition.midlet.MIDlet;
import javax.microedition.rms.InvalidRecordIDException;
import javax.microedition.rms.RecordStore;
import javax.microedition.rms.RecordStoreException;
import javax.microedition.rms.RecordStoreNotOpenException;

public class main extends MIDlet
  implements CommandListener
{
  Form jdField_a_of_type_JavaxMicroeditionLcduiForm = null;
  String jdField_a_of_type_JavaLangString = null;
  private String jdField_b_of_type_JavaLangString = "";
  private String jdField_c_of_type_JavaLangString = "";
  private String d = "";
  Display jdField_a_of_type_JavaxMicroeditionLcduiDisplay = Display.getDisplay(this);
  private d jdField_a_of_type_D = null;
  private c jdField_a_of_type_C = null;
  private Command jdField_b_of_type_JavaxMicroeditionLcduiCommand = null;
  Command jdField_a_of_type_JavaxMicroeditionLcduiCommand = null;
  private Command jdField_c_of_type_JavaxMicroeditionLcduiCommand = new Command("инфо", 7, 0);
  private b jdField_a_of_type_B = null;
  String[] jdField_a_of_type_ArrayOfJavaLangString = { "Овен", "Телец", "Близнецы", "Рак", "Лев", "Дева", "Весы", "Скорпион", "Стрелец", "Козерог", "Водолей", "Рыбы" };
  private List jdField_a_of_type_JavaxMicroeditionLcduiList = new List("гороскоп", 3, this.jdField_a_of_type_ArrayOfJavaLangString, null);
  private RecordStore jdField_a_of_type_JavaxMicroeditionRmsRecordStore = null;
  private boolean jdField_a_of_type_Boolean = false;
  String[] jdField_b_of_type_ArrayOfJavaLangString;
  int jdField_a_of_type_Int = 0;
  private a jdField_a_of_type_A = new a(this);

  // ERROR //
  public void startApp()
  {
    // Byte code:
    //   0: aload_0
    //   1: ldc 7
    //   3: iconst_1
    //   4: invokestatic 111 javax/microedition/rms/RecordStore:openRecordStore (Ljava/lang/String;Z)Ljavax/microedition/rms/RecordStore;
    //   7: putfield 61 main:jdField_a_of_type_JavaxMicroeditionRmsRecordStore Ljavax/microedition/rms/RecordStore;
    //   10: aload_0
    //   11: getfield 61 main:jdField_a_of_type_JavaxMicroeditionRmsRecordStore Ljavax/microedition/rms/RecordStore;
    //   14: invokevirtual 109 javax/microedition/rms/RecordStore:getNumRecords ()I
    //   17: ifle +8 -> 25
    //   20: aload_0
    //   21: iconst_1
    //   22: putfield 62 main:jdField_a_of_type_Boolean Z
    //   25: goto +8 -> 33
    //   28: dup
    //   29: astore_1
    //   30: invokevirtual 112 javax/microedition/rms/RecordStoreException:printStackTrace ()V
    //   33: aload_0
    //   34: getfield 60 main:jdField_a_of_type_JavaxMicroeditionLcduiList Ljavax/microedition/lcdui/List;
    //   37: aload_0
    //   38: invokevirtual 104 javax/microedition/lcdui/List:setCommandListener (Ljavax/microedition/lcdui/CommandListener;)V
    //   41: aload_0
    //   42: getfield 60 main:jdField_a_of_type_JavaxMicroeditionLcduiList Ljavax/microedition/lcdui/List;
    //   45: aload_0
    //   46: getfield 68 main:jdField_c_of_type_JavaxMicroeditionLcduiCommand Ljavax/microedition/lcdui/Command;
    //   49: invokevirtual 102 javax/microedition/lcdui/List:addCommand (Ljavax/microedition/lcdui/Command;)V
    //   52: aload_0
    //   53: new 26 c
    //   56: dup
    //   57: invokespecial 72 c:<init> ()V
    //   60: putfield 54 main:jdField_a_of_type_C Lc;
    //   63: aload_0
    //   64: aload_0
    //   65: getfield 54 main:jdField_a_of_type_C Lc;
    //   68: invokevirtual 73 c:a ()Ljava/lang/String;
    //   71: putfield 56 main:jdField_a_of_type_JavaLangString Ljava/lang/String;
    //   74: aload_0
    //   75: aload_0
    //   76: getfield 54 main:jdField_a_of_type_C Lc;
    //   79: astore_1
    //   80: iconst_2
    //   81: anewarray 33 java/lang/String
    //   84: astore_2
    //   85: iconst_0
    //   86: istore_3
    //   87: iload_3
    //   88: aload_2
    //   89: arraylength
    //   90: if_icmpge +85 -> 175
    //   93: aload_1
    //   94: aload_1
    //   95: invokevirtual 84 java/lang/Object:getClass ()Ljava/lang/Class;
    //   98: new 34 java/lang/StringBuffer
    //   101: dup
    //   102: invokespecial 88 java/lang/StringBuffer:<init> ()V
    //   105: ldc 3
    //   107: invokevirtual 90 java/lang/StringBuffer:append (Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   110: iload_3
    //   111: invokevirtual 89 java/lang/StringBuffer:append (I)Ljava/lang/StringBuffer;
    //   114: ldc 2
    //   116: invokevirtual 90 java/lang/StringBuffer:append (Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   119: invokevirtual 91 java/lang/StringBuffer:toString ()Ljava/lang/String;
    //   122: invokevirtual 83 java/lang/Class:getResourceAsStream (Ljava/lang/String;)Ljava/io/InputStream;
    //   125: putfield 48 c:jdField_a_of_type_JavaIoInputStream Ljava/io/InputStream;
    //   128: aload_1
    //   129: aload_1
    //   130: getfield 48 c:jdField_a_of_type_JavaIoInputStream Ljava/io/InputStream;
    //   133: invokevirtual 80 java/io/InputStream:available ()I
    //   136: newarray byte
    //   138: putfield 49 c:jdField_a_of_type_ArrayOfByte [B
    //   141: aload_1
    //   142: getfield 48 c:jdField_a_of_type_JavaIoInputStream Ljava/io/InputStream;
    //   145: aload_1
    //   146: getfield 49 c:jdField_a_of_type_ArrayOfByte [B
    //   149: invokevirtual 81 java/io/InputStream:read ([B)I
    //   152: pop
    //   153: aload_2
    //   154: iload_3
    //   155: new 33 java/lang/String
    //   158: dup
    //   159: aload_1
    //   160: getfield 49 c:jdField_a_of_type_ArrayOfByte [B
    //   163: ldc 5
    //   165: invokespecial 86 java/lang/String:<init> ([BLjava/lang/String;)V
    //   168: aastore
    //   169: iinc 3 1
    //   172: goto -85 -> 87
    //   175: aload_2
    //   176: putfield 66 main:jdField_b_of_type_ArrayOfJavaLangString [Ljava/lang/String;
    //   179: goto +8 -> 187
    //   182: dup
    //   183: astore_1
    //   184: invokevirtual 79 java/io/IOException:printStackTrace ()V
    //   187: aload_0
    //   188: aload_0
    //   189: getfield 54 main:jdField_a_of_type_C Lc;
    //   192: invokevirtual 74 c:b ()Ljava/lang/String;
    //   195: putfield 64 main:jdField_b_of_type_JavaLangString Ljava/lang/String;
    //   198: aload_0
    //   199: aload_0
    //   200: getfield 54 main:jdField_a_of_type_C Lc;
    //   203: invokevirtual 75 c:c ()Ljava/lang/String;
    //   206: putfield 69 main:d Ljava/lang/String;
    //   209: goto +8 -> 217
    //   212: dup
    //   213: astore_1
    //   214: invokevirtual 82 java/io/UnsupportedEncodingException:printStackTrace ()V
    //   217: aload_0
    //   218: new 36 javax/microedition/lcdui/Command
    //   221: dup
    //   222: ldc 21
    //   224: iconst_4
    //   225: iconst_0
    //   226: invokespecial 94 javax/microedition/lcdui/Command:<init> (Ljava/lang/String;II)V
    //   229: putfield 65 main:jdField_b_of_type_JavaxMicroeditionLcduiCommand Ljavax/microedition/lcdui/Command;
    //   232: aload_0
    //   233: new 27 d
    //   236: dup
    //   237: aload_0
    //   238: invokespecial 76 d:<init> (Lmain;)V
    //   241: putfield 55 main:jdField_a_of_type_D Ld;
    //   244: aload_0
    //   245: getfield 55 main:jdField_a_of_type_D Ld;
    //   248: aload_0
    //   249: getfield 65 main:jdField_b_of_type_JavaxMicroeditionLcduiCommand Ljavax/microedition/lcdui/Command;
    //   252: invokevirtual 77 d:addCommand (Ljavax/microedition/lcdui/Command;)V
    //   255: aload_0
    //   256: getfield 55 main:jdField_a_of_type_D Ld;
    //   259: aload_0
    //   260: invokevirtual 78 d:setCommandListener (Ljavax/microedition/lcdui/CommandListener;)V
    //   263: aload_0
    //   264: getfield 58 main:jdField_a_of_type_JavaxMicroeditionLcduiDisplay Ljavax/microedition/lcdui/Display;
    //   267: aload_0
    //   268: getfield 55 main:jdField_a_of_type_D Ld;
    //   271: invokevirtual 96 javax/microedition/lcdui/Display:setCurrent (Ljavax/microedition/lcdui/Displayable;)V
    //   274: return
    //
    // Exception table:
    //   from to target type
    //   0 25 28 javax/microedition/rms/RecordStoreException
    //   74 179 182 java/io/IOException
    //   187 209 212 java/io/UnsupportedEncodingException
  }

  public void mainmenu()
  {
    this.jdField_a_of_type_D = null;
    this.jdField_a_of_type_JavaxMicroeditionLcduiDisplay.setCurrent(this.jdField_a_of_type_JavaxMicroeditionLcduiList);
  }

  public void pauseApp()
  {
  }

  public void destroyApp(boolean paramBoolean)
  {
  }

  public void commandAction(Command paramCommand, Displayable paramDisplayable)
  {
    if ((paramCommand == this.jdField_b_of_type_JavaxMicroeditionLcduiCommand) && (paramDisplayable == this.jdField_a_of_type_D))
      if (!(this.jdField_a_of_type_Boolean))
        showAttention();
      else
        mainmenu();
    Thread localThread;
    if ((paramCommand == this.jdField_b_of_type_JavaxMicroeditionLcduiCommand) && (paramDisplayable == this.jdField_a_of_type_JavaxMicroeditionLcduiForm))
    {
      showAttention();
      paramDisplayable = this.jdField_a_of_type_A;
      localThread = new Thread(paramDisplayable);
      if (paramDisplayable.jdField_a_of_type_Boolean)
      {
        localThread.start();
        paramDisplayable.jdField_a_of_type_Boolean = false;
      }
    }
    if (paramCommand == List.SELECT_COMMAND)
    {
      this.jdField_a_of_type_Int = this.jdField_a_of_type_JavaxMicroeditionLcduiList.getSelectedIndex();
      if (this.jdField_a_of_type_B == null)
        this.jdField_a_of_type_B = new b(this);
      paramDisplayable = this.jdField_a_of_type_B;
      (localThread = new Thread(paramDisplayable)).start();
    }
    if (paramCommand == this.jdField_a_of_type_JavaxMicroeditionLcduiCommand)
      this.jdField_a_of_type_JavaxMicroeditionLcduiDisplay.setCurrent(this.jdField_a_of_type_JavaxMicroeditionLcduiList);
    if (paramCommand != this.jdField_c_of_type_JavaxMicroeditionLcduiCommand)
      return;
    this.jdField_a_of_type_JavaxMicroeditionLcduiForm = new Form("");
    this.jdField_a_of_type_JavaxMicroeditionLcduiCommand = new Command("назад", 2, 0);
    this.jdField_a_of_type_JavaxMicroeditionLcduiForm.append(this.jdField_b_of_type_JavaLangString);
    this.jdField_a_of_type_JavaxMicroeditionLcduiForm.addCommand(this.jdField_a_of_type_JavaxMicroeditionLcduiCommand);
    this.jdField_a_of_type_JavaxMicroeditionLcduiForm.setCommandListener(this);
    this.jdField_a_of_type_JavaxMicroeditionLcduiDisplay.setCurrent(this.jdField_a_of_type_JavaxMicroeditionLcduiForm);
  }

  public String getAttention()
  {
    Object localObject;
    try
    {
      this.jdField_c_of_type_JavaLangString = new String(this.jdField_a_of_type_JavaxMicroeditionRmsRecordStore.getRecord(1));
    }
    catch (RecordStoreNotOpenException localRecordStoreNotOpenException)
    {
      (localObject = localRecordStoreNotOpenException).printStackTrace();
    }
    catch (InvalidRecordIDException localInvalidRecordIDException)
    {
      (localObject = localInvalidRecordIDException).printStackTrace();
    }
    catch (RecordStoreException localRecordStoreException)
    {
      (localObject = localRecordStoreException).printStackTrace();
    }
    return ((String)this.jdField_c_of_type_JavaLangString);
  }

  public void showAttention()
  {
    this.jdField_a_of_type_JavaxMicroeditionLcduiForm = new Form("");
    this.jdField_a_of_type_JavaxMicroeditionLcduiForm.append(this.d);
    this.jdField_b_of_type_JavaxMicroeditionLcduiCommand = new Command("ok", 4, 0);
    this.jdField_a_of_type_JavaxMicroeditionLcduiForm.addCommand(this.jdField_b_of_type_JavaxMicroeditionLcduiCommand);
    this.jdField_a_of_type_JavaxMicroeditionLcduiForm.setCommandListener(this);
    this.jdField_a_of_type_JavaxMicroeditionLcduiDisplay.setCurrent(this.jdField_a_of_type_JavaxMicroeditionLcduiForm);
  }

  public void getFirstSms()
  {
    Object localObject;
    try
    {
      this.jdField_a_of_type_JavaxMicroeditionRmsRecordStore.addRecord("1".getBytes(), 0, 1);
      this.jdField_a_of_type_JavaxMicroeditionRmsRecordStore.closeRecordStore();
    }
    catch (RecordStoreNotOpenException localRecordStoreNotOpenException)
    {
      (localObject = localRecordStoreNotOpenException).printStackTrace();
    }
    catch (RecordStoreException localRecordStoreException)
    {
      (localObject = localRecordStoreException).printStackTrace();
    }
    this.jdField_a_of_type_Boolean = true;
    mainmenu();
  }
}

 

Revise this Paste

Your Name: Code Language: