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

📄 processjad.java

📁 国外的一款体育游戏的源代码
💻 JAVA
字号:
import java.io.*;

public class ProcessJad
{
	public static void main(String[] args)
	{
		String inFileName = null;
		String outFileName = null;
		int i, j;

		String key = null;
		String value = null;
		for (i = 0; i < args.length; i++)
		{
			try
			{
				j = args[i].indexOf("=");
				if (j != -1)
				{
					key = args[i].substring(0,j).toLowerCase();
					value = args[i].substring(j + 1);

					if (key.equals("in")) inFileName = value;
					if (key.equals("out")) outFileName = value;
				}
			}
			catch(Exception ex){}
		}

		System.out.print("Post-processing JAD file '" + inFileName + "'...");

		try
		{
			FileInputStream in = new FileInputStream(inFileName);
			PrintStream out = new PrintStream(new FileOutputStream(outFileName));

			char c;
			StringBuffer sb = new StringBuffer();
			String res;

			while((i = in.read()) != -1)
			{
				c = (char)i;
				if (c == '^') c = '&';

				if (c == '\n' || (c == '\r'))
				{                                                
					res = sb.toString().trim();
					if (res.length() > 0 && (!res.startsWith("//")))
					{
						out.println(res);
					}
					sb.setLength(0);
				}
				else sb.append(c);
			}
			in.close();
			out.close();
			System.out.println("OK");
		}
		catch(Exception ex)
		{
			System.out.println("failed:");
			ex.printStackTrace();
		}
	}
}

⌨️ 快捷键说明

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