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

📄 g.java

📁 很好的3款手机游戏源码
💻 JAVA
字号:
// 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.InputStream;
import javax.microedition.media.Manager;
import javax.microedition.media.Player;

public class g
{

	private Player a;

	public g()
	{
	}

	public final void a(String s)
	{
		try
		{
			InputStream inputstream = getClass().getResourceAsStream(s);
			String s1 = null;
			if (s.indexOf(".mid") != -1 || s.indexOf(".MID") != -1)
				s1 = "audio/midi";
			else
			if (s.indexOf(".wav") != -1)
				s1 = "audio/x-wav";
			else
			if (s.indexOf(".mp3") != -1 || s.indexOf(".MP3") != -1)
				s1 = "audio/mpeg";
			a = Manager.createPlayer(inputstream, s1);
			a.realize();
			a.prefetch();
		}
		catch (Exception exception)
		{
			exception.printStackTrace();
		}
	}

	public final void a(int i)
	{
		if (a != null && a.getState() != 0 && a.getState() != 400)
			a.setLoopCount(i);
	}

	public final void for()
	{
		try
		{
			if (a != null && a.getState() != 400)
				a.start();
		}
		catch (Exception exception)
		{
			exception.printStackTrace();
		}
	}

	public final boolean a()
	{
		return a != null && a.getState() == 400;
	}

	public final void if()
	{
		try
		{
			if (a != null)
				a.stop();
		}
		catch (Exception exception) { }
	}

	public final void do()
	{
		try
		{
			if (a != null)
			{
				if (a.getState() == 400)
					a.stop();
				a.close();
				a.deallocate();
				a = null;
			}
		}
		catch (Exception exception) { }
	}
}

⌨️ 快捷键说明

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