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

📄 genericmessage.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:   GenericMessage.java

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

import com.aelitis.azureus.core.peermanager.messaging.Message;
import com.aelitis.azureus.core.peermanager.messaging.MessageException;
import org.gudy.azureus2.core3.util.DirectByteBuffer;

public class GenericMessage
	implements Message
{

	private DirectByteBuffer buffer;
	private final String id;
	private final String desc;
	private final boolean already_encoded;

	protected GenericMessage(String _id, String _desc, DirectByteBuffer _buffer, boolean _already_encoded)
	{
		buffer = null;
		id = _id;
		desc = _desc;
		buffer = _buffer;
		already_encoded = _already_encoded;
	}

	protected boolean isAlreadyEncoded()
	{
		return already_encoded;
	}

	public String getID()
	{
		return id;
	}

	public byte[] getIDBytes()
	{
		return id.getBytes();
	}

	public String getFeatureID()
	{
		return null;
	}

	public int getFeatureSubID()
	{
		return 0;
	}

	public int getType()
	{
		return 1;
	}

	public String getDescription()
	{
		return desc;
	}

	public byte getVersion()
	{
		return 1;
	}

	public DirectByteBuffer getPayload()
	{
		return buffer;
	}

	public DirectByteBuffer[] getData()
	{
		return (new DirectByteBuffer[] {
			buffer
		});
	}

	public Message deserialize(DirectByteBuffer data, byte version)
		throws MessageException
	{
		throw new MessageException("not imp");
	}

	public void destroy()
	{
		buffer.returnToPool();
	}
}

⌨️ 快捷键说明

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