resourcedownloadererrorimpl.java

来自「java 文件下载器。可自定义」· Java 代码 · 共 77 行

JAVA
77
字号
// 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:   ResourceDownloaderErrorImpl.java

package org.gudy.azureus2.pluginsimpl.local.utils.resourcedownloader;

import java.io.InputStream;
import org.gudy.azureus2.plugins.utils.resourcedownloader.ResourceDownloaderException;
import org.gudy.azureus2.plugins.utils.resourcedownloader.ResourceDownloaderListener;

// Referenced classes of package org.gudy.azureus2.pluginsimpl.local.utils.resourcedownloader:
//			ResourceDownloaderBaseImpl

public class ResourceDownloaderErrorImpl extends ResourceDownloaderBaseImpl
{

	protected ResourceDownloaderException error;

	protected ResourceDownloaderErrorImpl(ResourceDownloaderBaseImpl _parent, ResourceDownloaderException _error)
	{
		super(_parent);
		error = _error;
	}

	public String getName()
	{
		return (new StringBuilder()).append("<error>:").append(error.getMessage()).toString();
	}

	public ResourceDownloaderBaseImpl getClone(ResourceDownloaderBaseImpl parent)
	{
		return this;
	}

	public InputStream download()
		throws ResourceDownloaderException
	{
		throw error;
	}

	public void asyncDownload()
	{
	}

	protected void setSize(long l)
	{
	}

	public void setProperty(String name, Object value)
	{
		setPropertySupport(name, value);
	}

	public long getSize()
		throws ResourceDownloaderException
	{
		throw error;
	}

	public void cancel()
	{
		setCancelled();
	}

	public void reportActivity(String activity)
	{
		informActivity(activity);
	}

	public void addListener(ResourceDownloaderListener l)
	{
		super.addListener(l);
		informFailed(error);
	}
}

⌨️ 快捷键说明

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