p.java

来自「很好的3款手机游戏源码」· Java 代码 · 共 138 行

JAVA
138
字号
// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space 

import java.io.*;
import java.util.Hashtable;

public class p
{

	private Hashtable a;

	public p(String s)
	{
		a(s);
	}

	public String a(String s)
	{
		String s1 = (String)a.get(s.toLowerCase());
		if (s1 != null)
			return s1;
		else
			return s;
	}

	public int a(String s)
	{
		String s1 = (String)a.get(s.toLowerCase());
		if (s1 != null)
			return Integer.parseInt(s1);
		else
			return 1;
	}

	public void a(String s)
	{
		InputStream inputstream;
		a = new Hashtable();
		inputstream = null;
		inputstream = getClass().getResourceAsStream(s);
		boolean flag = false;
		byte abyte0[] = new byte[1];
		StringBuffer stringbuffer = new StringBuffer();
		while (!flag) 
		{
			int i = inputstream.read(abyte0);
			if (i != -1)
			{
				if (abyte0[0] == 10)
				{
					String s1 = stringbuffer.toString().trim();
					StringBuffer stringbuffer1 = new StringBuffer("");
					char ac[] = new char[s1.length()];
					byte abyte1[] = new byte[s1.length()];
					s1.getChars(0, s1.length(), ac, 0);
					for (int j = 0; j < ac.length; j++)
						abyte1[j] = (byte)ac[j];

					try
					{
						for (int k = 0; k < abyte1.length;)
						{
							int l = abyte1[k++];
							if (l < 0)
								l += 256;
							int i1;
							if (k < abyte1.length)
							{
								i1 = abyte1[k++];
								if (i1 < 0)
									i1 += 256;
							} else
							{
								i1 = 0;
							}
							char c = (char)(l + (i1 << 8));
							stringbuffer1.append(c);
						}

						s1 = null;
						s1 = stringbuffer1.toString();
					}
					catch (Exception exception)
					{
						System.out.println(exception);
					}
					if (!s1.startsWith("#") && stringbuffer1.length() > 2 && s1.indexOf('=') != -1)
					{
						String s2 = s1.substring(0, s1.indexOf('=')).trim().toLowerCase();
						String s3 = s1.substring(s1.indexOf('=') + 1).trim();
						a.put(s2, s3);
					}
					stringbuffer.setLength(0);
				} else
				{
					stringbuffer.append((char)abyte0[0]);
				}
			} else
			{
				flag = true;
			}
		}
		try
		{
			inputstream.close();
		}
		catch (IOException ioexception)
		{
			System.out.println("Error closing txt.txt: " + ioexception);
		}
		break MISSING_BLOCK_LABEL_506;
		IOException ioexception1;
		ioexception1;
		System.out.println("Error loading txt.txt: " + ioexception1);
		try
		{
			inputstream.close();
		}
		catch (IOException ioexception2)
		{
			System.out.println("Error closing txt.txt: " + ioexception2);
		}
		break MISSING_BLOCK_LABEL_506;
		Exception exception1;
		exception1;
		try
		{
			inputstream.close();
		}
		catch (IOException ioexception3)
		{
			System.out.println("Error closing txt.txt: " + ioexception3);
		}
		throw exception1;
	}
}

⌨️ 快捷键说明

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