me.edwards.des.net.packet
Class PacketNotFound

java.lang.Object
  extended by me.edwards.des.net.packet.Packet
      extended by me.edwards.des.net.packet.PacketNotFound

public class PacketNotFound
extends Packet

Not Found Packet

This packet is sent to signal that a specified resource in a PacketGetData could not be found.

Created on: Nov 3, 2015 at 10:19:25 AM

Author:
Matthew Edwards

Nested Class Summary
 
Nested classes/interfaces inherited from class me.edwards.des.net.packet.Packet
Packet.PacketTypes
 
Field Summary
private  java.lang.String hash
           
private  int type
           
 
Constructor Summary
PacketNotFound(byte[] binary)
          Creates new PacketNotFound from binary data
PacketNotFound(int type, java.lang.String hash)
          Creates new PacketNotFound
 
Method Summary
 byte[] getBinary()
          Returns the binary payload of this Packet as a byte array.
 java.lang.String getHash()
          Returns the hash of the inventory vector.
 int getType()
          Returns the type of the inventory vector.
 
Methods inherited from class me.edwards.des.net.packet.Packet
getID, lookup, toHex, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

type

private int type

hash

private java.lang.String hash
Constructor Detail

PacketNotFound

public PacketNotFound(int type,
                      java.lang.String hash)
Creates new PacketNotFound

Parameters:
type - Inventory Vector type
hash - Inventory Vector hash
See Also:
PacketInv.InvVector

PacketNotFound

public PacketNotFound(byte[] binary)
Creates new PacketNotFound from binary data

Parameters:
binary - Packet binary data as byte array
Method Detail

getType

public int getType()
Returns the type of the inventory vector.

Returns:
Type of the inventory vector
See Also:
PacketInv

getHash

public java.lang.String getHash()
Returns the hash of the inventory vector.

Returns:
Hash of the inventory vector

getBinary

public byte[] getBinary()
Description copied from class: Packet
Returns the binary payload of this Packet as a byte array.

Specified by:
getBinary in class Packet
Returns:
Binary payload as a byte array