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

📄 test.java

📁 java 文件下载器。可自定义
💻 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 
// Source File Name:   Test.java

package org.gudy.azureus2.pluginsimpl.local.update;

import java.io.*;
import java.util.Properties;
import org.gudy.azureus2.core3.util.AEThread;
import org.gudy.azureus2.plugins.*;
import org.gudy.azureus2.plugins.update.UpdateInstaller;
import org.gudy.azureus2.plugins.update.UpdateManager;

public class Test
	implements Plugin, PluginListener
{

	protected PluginManager manager;

	public Test()
	{
	}

	public Test(boolean ignore)
	{
		Properties props = new Properties();
		props.put("MULTI_INSTANCE", "true");
		PluginManager.registerPlugin(org/gudy/azureus2/pluginsimpl/local/update/Test);
		PluginManager.startAzureus(1, props);
	}

	public void initialize(PluginInterface pi)
		throws PluginException
	{
		manager = pi.getPluginManager();
		pi.addListener(this);
	}

	public void initializationComplete()
	{
		(new AEThread("update tester") {

			final Test this$0;

			public void runSupport()
			{
				try
				{
					UpdateManager update_man = manager.getDefaultPluginInterface().getUpdateManager();
					UpdateInstaller installer = update_man.createInstaller();
					File from_file = new File("C:\\temp\\update_from");
					File to_file = new File("C:\\temp\\update_to");
					PrintWriter pw = new PrintWriter(new FileWriter(from_file));
					pw.println("hello mum");
					pw.close();
					to_file.delete();
					installer.addMoveAction(from_file.toString(), to_file.toString());
					update_man.applyUpdates(false);
				}
				catch (Throwable e)
				{
					e.printStackTrace();
				}
			}

			
			{
				this$0 = Test.this;
				super(x0);
			}
		}).start();
	}

	public void closedownInitiated()
	{
	}

	public void closedownComplete()
	{
	}

	public static void main(String args[])
	{
		new Test(true);
	}
}

⌨️ 快捷键说明

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