📄 resourcedownloaderdelayedimpl.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: ResourceDownloaderDelayedImpl.java
package org.gudy.azureus2.pluginsimpl.local.utils.resourcedownloader;
import java.io.InputStream;
import org.gudy.azureus2.core3.util.AEMonitor;
import org.gudy.azureus2.plugins.utils.resourcedownloader.*;
// Referenced classes of package org.gudy.azureus2.pluginsimpl.local.utils.resourcedownloader:
// ResourceDownloaderBaseImpl, ResourceDownloaderErrorImpl
public class ResourceDownloaderDelayedImpl extends ResourceDownloaderBaseImpl
{
protected ResourceDownloaderDelayedFactory factory;
protected ResourceDownloaderBaseImpl delegate;
protected long size;
protected ResourceDownloaderDelayedImpl(ResourceDownloaderBaseImpl _parent, ResourceDownloaderDelayedFactory _factory)
{
super(_parent);
size = -2L;
factory = _factory;
}
protected void getDelegate()
{
this_mon.enter();
if (delegate == null)
try
{
delegate = (ResourceDownloaderBaseImpl)factory.create();
delegate.setParent(this);
if (size >= 0L)
delegate.setSize(size);
}
catch (ResourceDownloaderException e)
{
delegate = new ResourceDownloaderErrorImpl(this, e);
}
this_mon.exit();
break MISSING_BLOCK_LABEL_95;
Exception exception;
exception;
this_mon.exit();
throw exception;
}
public String getName()
{
if (delegate == null)
return "<...>";
else
return delegate.getName();
}
public ResourceDownloaderBaseImpl getClone(ResourceDownloaderBaseImpl parent)
{
ResourceDownloaderDelayedImpl c = new ResourceDownloaderDelayedImpl(parent, factory);
c.setSize(size);
c.setProperties(this);
return c;
}
public InputStream download()
throws ResourceDownloaderException
{
getDelegate();
return delegate.download();
}
public void asyncDownload()
{
getDelegate();
delegate.asyncDownload();
}
protected void setSize(long _size)
{
size = _size;
if (delegate != null && size >= 0L)
delegate.setSize(size);
}
public void setProperty(String name, Object value)
throws ResourceDownloaderException
{
setPropertySupport(name, value);
if (delegate != null)
delegate.setProperty(name, value);
}
public long getSize()
throws ResourceDownloaderException
{
getDelegate();
return delegate.getSize();
}
public void cancel()
{
setCancelled();
getDelegate();
delegate.cancel();
}
public void reportActivity(String activity)
{
getDelegate();
delegate.reportActivity(activity);
}
public void addListener(ResourceDownloaderListener l)
{
getDelegate();
delegate.addListener(l);
}
public void removeListener(ResourceDownloaderListener l)
{
getDelegate();
delegate.removeListener(l);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -