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

📄 prudppacketreplyscrape.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:   PRUDPPacketReplyScrape.java

package org.gudy.azureus2.core3.tracker.protocol.udp;

import com.aelitis.net.udp.uc.PRUDPPacketReply;
import java.io.*;

public class PRUDPPacketReplyScrape extends PRUDPPacketReply
{

	protected static final int BYTES_PER_ENTRY = 32;
	protected byte hashes[][];
	protected int complete[];
	protected int incomplete[];
	protected int downloaded[];

	public PRUDPPacketReplyScrape(int trans_id)
	{
		super(2, trans_id);
	}

	protected PRUDPPacketReplyScrape(DataInputStream is, int trans_id)
		throws IOException
	{
		super(2, trans_id);
		hashes = new byte[is.available() / 32][];
		complete = new int[hashes.length];
		incomplete = new int[hashes.length];
		downloaded = new int[hashes.length];
		for (int i = 0; i < hashes.length; i++)
		{
			hashes[i] = new byte[20];
			is.read(hashes[i]);
			complete[i] = is.readInt();
			downloaded[i] = is.readInt();
			incomplete[i] = is.readInt();
		}

	}

	public void setDetails(byte _hashes[][], int _complete[], int _downloaded[], int _incomplete[])
	{
		hashes = _hashes;
		complete = _complete;
		downloaded = _downloaded;
		incomplete = _incomplete;
	}

	public byte[][] getHashes()
	{
		return hashes;
	}

	public int[] getComplete()
	{
		return complete;
	}

	public int[] getDownloaded()
	{
		return downloaded;
	}

	public int[] getIncomplete()
	{
		return incomplete;
	}

	public void serialise(DataOutputStream os)
		throws IOException
	{
		super.serialise(os);
		if (hashes != null)
		{
			for (int i = 0; i < hashes.length; i++)
			{
				os.write(hashes[i]);
				os.writeInt(complete[i]);
				os.writeInt(downloaded[i]);
				os.writeInt(incomplete[i]);
			}

		}
	}

	public String getString()
	{
		return super.getString().concat("[hashes=").concat(String.valueOf(hashes.length)).concat("]");
	}
}

⌨️ 快捷键说明

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