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

📄 pica.java

📁 // pica客户端J2ME源码
💻 JAVA
字号:
// pica客户端J2ME源码,100%可运行可修改,J2ME逆向工程经典作品
// 作者:fangji999
// QQ:57979471 Email:fangji999@163.com
// 博客:http://hi.baidu.com/ccall_net
// QQ群:51719370
// 如用此源码重新改写的软件或转载,请保留本人联系方式,作品原创作者

package pica;

import java.io.*;
import java.util.*;
import javax.microedition.io.ConnectionNotFoundException;
import javax.microedition.lcdui.*;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
import javax.microedition.rms.RecordEnumeration;
import javax.microedition.rms.RecordStore;

// Referenced classes of package pica:
//			aa, ad, ae, c, 
//			g, j, m, p, 
//			q, s, t, v, 
//			w, d, i, ai, 
//			ac

public class Pica extends MIDlet
{

	public static String a = "middle";
	public static String b = null;
	public static String c = null;
	public static String d;
	public static j e;
	public static j f;
	public static s g;
	public static q h;
	public static String i = null;
	public static Display j;
	public static ae k;
	public static v l;
	public static t m;
	public static d n;
	public static g o;
	public static int p;
	public static Font q;
	public static int r;
	public static Image s;
	public static Image t;
	public static Image u;
	public static Image v;
	public static Image wi;//public static Image w;
	public static Image x;
	public static Image y;
	public static Image z;
	public static Image A;
	public static Image B;
	public static Image C;
	public static Image D;
	public static Image E;
	public static Image F;
	public static Image G;
	public static int H;
	public static Pica I;
	private static boolean aZ = false;
	public static i J;
	public static ai K;
	public static boolean L = false;
	public static String M = null;
	public static String N = null;
	public static String O = null;
	public static boolean P = true;
	public static boolean Q = false;
	public static boolean R = false;
	public static boolean S = false;
	public static boolean T = false;
	public static boolean U = false;
	public static String V[];
	public static boolean W = false;
	public static ac X;
	public static int Y = 9;
	public static boolean Z = false;
	public static boolean aa = false;
	public static boolean ab = false;
	public static boolean ac = false;
	public static boolean ad = false;
	public static String ae = null;
	public static boolean af = true;
	public static Vector ag;
	public static Vector ah;
	public static String ai = null;
	public static String aj = null;
	public static String ak = null;
	public static String al = null;
	public static int am = 0;
	public static int an = 0;
	public static String ao = null;
	public static String ap = null;
	public static String aq = null;
	public static String ar = null;
	public static String as = null;
	public static String at = null;
	public static String au = null;
	public static String av = null;
	public static String aw = null;
	public static String ax = null;
	public static String ay = null;
	public static String az = "";
	public static String aA = "";
	public static String aB = "";
	public static String aC = "";
	public static boolean aD = false;
	public static boolean aE = false;
	public static int aF = 15;
	public static int aG = 15;
	public static int aH = 1;
	public static int aI = 10;
	public static int aJ[] = {
		10, 10, 20, 20, 40, 60, 120, 180
	};
	public static boolean aK = true;
	public static boolean aL = false;
	public static String aM="";//public static String aM;
	public static boolean aN = false;
	public static String aO = "";
	public static String aP = "";
	public static boolean aQ;
	public static boolean aR = false;
	public static String aS = null;
	public static int aT;
	public static Image aU;
	public static int aV = 28;
	public static Timer aW = null;
	public static int aX = 0;
	public static Vector aY = new Vector();

	public Pica()
		throws Exception
	{
		I = this;
		//getAppProperty("MIDlet-Name");
//		d = getAppProperty("CompileVersion");
//		aM = getAppProperty("Use-Proxy");
//		b = getAppProperty("PICA-Source");
//		c = getAppProperty("Room-Source");
                d="0.904.442.cn";
                aM="NO";
                b="pica";
                c="";
		if (b == null)
			b = "";
		if (c == null)
			c = "";
		try
		{
			q = Font.getFont(0, 0, 8);
			aT = q.charWidth('1');
			r = q.getHeight();
			if (r < 18)
				p = 22;
			else
				p = r + 4;
		}
		catch (Exception  e)
		{
			p = 18;
		}
		g();
	}

	public static Pica a()
	{
		return I;
	}

	public static Image a(String s1)
	{
		Image image = null;
		try
		{
			image = Image.createImage(s1);
		}
		catch (Exception  e) { }
		return image;
	}

	private void g()
	{
		s = a("/PICA.png");
		t = a("/" + a + "/headicon.png");
		u = a("/" + a + "/stateicon.png");
		v = a("/" + a + "/msgicon.png");
		wi = a("/" + a + "/titlelogo.png");
		y = a("/" + a + "/title.png");
		z = a("/" + a + "/arrow.png");
		x = a("/" + a + "/imgchannelicon.png");
		A = a("/" + a + "/clustericon.png");
		B = a("/" + a + "/chatroomadmin.png");
		C = a("/" + a + "/cursor.png");
		D = a("/" + a + "/rank.png");
		E = a("/" + a + "/level.png");
		F = a("/" + a + "/emotion.png");
		G = a("/" + a + "/card.png");
		aU = a("/" + a + "/mouse.png");
	}

	public final void startApp()
		throws MIDletStateChangeException
	{
		if (aZ)
		{
			aZ = false;
			return;
		} else
		{
			j = Display.getDisplay(this);
			l = new v();
			l.setFullScreenMode(true);
			pica.ad.a();//初始化
			pica.w.e();//登录界面初始化
			j.setCurrent(l);
			return;
		}
	}

	public static void b()
	{
		Exception exception;
		try
		{
			for (int i1 = 0; g != null && i1 < 300 && g.a != -1; i1++)
			{
				Thread.yield();
				Thread.sleep(30L);
			}

		}
		catch (Exception  e)
		{
			h.c = true;
			return;
		}
		finally
		{
			h.c = true;
		}
		h.c = true;
		return;
//		throw exception;
	}

	public static void c()
	{
		try
		{
			k.a = true;
			if (h != null)
			{
				h.g();
				b();
			}
		}
		catch (Exception  e) { }
		try
		{
			I.notifyDestroyed();
			return;
		}
		catch (Exception  e)
		{
			return;
		}
	}

	public static void a(boolean flag)
	{
		try
		{
			i = null;
			k.a = flag;
			if (h != null)
			{
				h.g();
				b();
			}
			h();
		}
		catch (Exception  e) { }
		pica.w.e();
	}

	private static void h()
	{
		for (int i1 = 0; i1 < m.q(); i1++)
		{
			c c1;
			(c1 = (c)m.b(i1)).a.m();
		}

		m.m();
		m = null;
		e.m();
		e = null;
		J.m();
		J = null;
		if (K != null)
		{
			K.m();
			K = null;
		}
		if (X != null)
		{
			X.m();
			X = null;
		}
		ag.removeAllElements();
		ag = null;
		ah.removeAllElements();
		ah = null;
		l.d.removeAllElements();
	}

	public final void pauseApp()
	{
		aZ = true;
	}

	public final void destroyApp(boolean flag)
	{
	}

	public static void d()
	{
		e.a();
		String s1 = "msg-" + w.ls;
		Object obj = null;
		try
		{
			RecordStore recordstore;
			if ((recordstore = RecordStore.openRecordStore(s1, false)) != null && recordstore.getNumRecords() > 0)
			{
				RecordEnumeration recordenumeration;
				DataInputStream datainputstream;
				for (recordenumeration = recordstore.enumerateRecords(null, null, true); recordenumeration.hasNextElement(); datainputstream.close())
				{
					int j1 = recordenumeration.nextRecordId();
					byte abyte0[] = recordstore.getRecord(j1);
					String s2 = (datainputstream = new DataInputStream(new ByteArrayInputStream(abyte0))).readUTF();
					String s8 = datainputstream.readUTF();
					String s3 = datainputstream.readUTF();
					String s4 = datainputstream.readUTF();
					String s5 = datainputstream.readUTF();
					String s6 = datainputstream.readUTF();
					String s7 = datainputstream.readUTF();
					int i1 = datainputstream.readInt();
					long l1 = datainputstream.readLong();
					p p1;
					(p1 = new p(j1, s2, s3, s4, s5, s6, s7, i1, (String[][])null, null)).vd.setTime(l1);
					p1.t = s8;
					e.a(p1, true);
				}

				recordenumeration.destroy();
				e.p = 0;
			}
			recordstore.closeRecordStore();
			return;
		}
		catch (Exception  e)
		{
			return;
		}
	}

	public static void a(int i1)
	{
		String s1 = "msg-" + w.ls;
		Object obj = null;
		try
		{
			RecordStore recordstore;
			(recordstore = RecordStore.openRecordStore(s1, true)).deleteRecord(i1);
			recordstore.closeRecordStore();
			return;
		}
		catch (Exception  e)
		{
			return;
		}
	}
//保存消息到存储里
	public static void a(p p1)
	{
		String s1 = "msg-" + w.ls;
		RecordStore recordstore = null;
		try
		{
			recordstore = RecordStore.openRecordStore(s1, true);
			if (p1.u == -1)
			{
				recordstore.deleteRecord(p1.a);
			} else
			{
				ByteArrayOutputStream bytearrayoutputstream = new ByteArrayOutputStream();
				DataOutputStream dataoutputstream = new DataOutputStream(bytearrayoutputstream);
				boolean flag = true;
				try
				{
					recordstore.getRecord(p1.a);
				}
				catch (Exception  e)
				{
					flag = false;
				}
				if (!flag)
					p1.a = recordstore.getNextRecordID();
				dataoutputstream.writeUTF(p1.b);
				dataoutputstream.writeUTF(p1.t);
				dataoutputstream.writeUTF(p1.c);
				dataoutputstream.writeUTF(p1.d);
				dataoutputstream.writeUTF(p1.q);
				dataoutputstream.writeUTF(p1.r);
				dataoutputstream.writeUTF(p1.s);
				dataoutputstream.writeInt(p1.u);
				dataoutputstream.writeLong(p1.vd.getTime());
				byte abyte0[] = bytearrayoutputstream.toByteArray();
				if (flag)
					recordstore.setRecord(p1.a, abyte0, 0, abyte0.length);
				else
					recordstore.addRecord(abyte0, 0, abyte0.length);
				dataoutputstream.close();
				bytearrayoutputstream.close();
			}
		}
		catch (Exception  e) { }
		try
		{
			recordstore.closeRecordStore();
			return;
		}
		catch (Exception  e)
		{
			return;
		}
	}

	public static void e()
	{
		String s1 = "msg-" + w.ls;
		try
		{
			RecordStore.deleteRecordStore(s1);
			return;
		}
		catch (Exception  e)
		{
			return;
		}
	}

	public static void f()
	{
		while (j.getCurrent() instanceof Alert) 
			try
			{
				Thread.sleep(100L);
			}
			catch (Exception  e)
			{
				return;
			}
	}

	public static String b(String s1)
	{
		String s2 = "";
		m m1;
		try
		{
			if ((m1 = m.b(s1)) != null)
				s2 = m1.a;
			else
			if (s1.equals("freesms.pica"))
				s2 = "PICA短信";
			else
			if (s1.indexOf("@") > 0)
				s2 = s1.substring(0, s1.indexOf("@"));
			else
				s2 = s1;
		}
		catch (Exception  e) { }
		return s2;
	}

	public final void c(String s1)
	{
		try
		{
			platformRequest("tel:" + s1);
			return;
		}
		catch (Exception  e)
		{
			return;
		}
	}
//页面主入口函数
	public final void a(String s1, byte byte0)
	{
		try
		{
			System.out.println("网址:"+s1+":b0:"+byte0);
                        if ((s1 = s1.trim()).endsWith(".mid") || s1.endsWith(".amr") || s1.endsWith(".mp3") || s1.endsWith(".mmf") || s1.endsWith(".wav") || s1.endsWith(".jpg") || s1.endsWith(".jpeg") || s1.endsWith(".gif") || s1.endsWith(".jad") || s1.endsWith(".jar") || s1.endsWith(".sis"))
			{
				platformRequest(s1);
			} else
			{
				if (s1.startsWith("http://"))
				{
					String s2;
					if ((s2 = s1.substring(7)).indexOf("/") > 0)
						s2 = s2.substring(0, s2.indexOf("/"));
					o.e = s2;
				} else
				if (s1.startsWith("/"))
					s1 = "http://" + o.e + s1;
				else
					s1 = "http://" + o.e + "/" + s1;
                                System.out.println("网址11:"+s1+":b0:"+byte0);
				o.a(s1, byte0);
				o.c = o.d;
				o.d = s1;
				l.a(l.d.size() - 1);
			}
			return;
		}
		catch (Exception  e)
		{
			return;
		}
	}

	public final void a(String s1, boolean flag) throws ConnectionNotFoundException, IOException
	{
		try
		{
			System.out.println("ss11:"+s1);
                        if ((s1 = s1.trim()).endsWith(".mid") || s1.endsWith(".amr") || s1.endsWith(".mp3") || s1.endsWith(".mmf") || s1.endsWith(".wav") || s1.endsWith(".jpg") || s1.endsWith(".jpeg") || s1.endsWith(".gif") || s1.endsWith(".jad") || s1.endsWith(".jar") || s1.endsWith(".sis"))
			{
				platformRequest(s1);
				return;
			}
		}
		catch (Exception  e)
		{
			return;
		}
		if (!flag)
		{
 			platformRequest(s1);
			return;
		}
		if (s1.startsWith("http://"))
		{
			String s2;
			if ((s2 = s1.substring(7)).indexOf("/") > 0)
				s2 = s2.substring(0, s2.indexOf("/"));
			o.e = s2;
		} else
		if (s1.startsWith("/"))
			s1 = "http://" + o.e + s1;
		else
			s1 = "http://" + o.e + "/" + s1;
		o.a(s1, (byte)-1);
		o.c = o.d;
		o.d = s1;
		l.a(l.d.size() - 1);
		return;
	}

}

⌨️ 快捷键说明

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