|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectme.edwards.des.net.packet.Packet
me.edwards.des.net.packet.PacketGetData
public class PacketGetData
Get Data Packet
This packet is sent to request a particular piece, or pieces, of data.
Created on: Nov 3, 2015 at 10:06:19 AM
Nested Class Summary |
---|
Nested classes/interfaces inherited from class me.edwards.des.net.packet.Packet |
---|
Packet.PacketTypes |
Field Summary | |
---|---|
private java.util.ArrayList<PacketInv.InvVector> |
vectors
|
Constructor Summary | |
---|---|
PacketGetData()
Creates new PacketGetData |
|
PacketGetData(byte[] binary)
Creates new PacketGetData from binary data |
Method Summary | |
---|---|
void |
addInv(int type,
java.lang.String hash)
Adds an inventory object to this Packet. |
byte[] |
getBinary()
Returns the binary payload of this Packet as a byte array. |
java.lang.String |
getHash(int index)
Returns the hash of the vector at the specified index. |
int |
getSize()
Returns the number of vectors in this Packet. |
int |
getType(int index)
Returns the type of the vector at the specified index. |
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 |
---|
private java.util.ArrayList<PacketInv.InvVector> vectors
Constructor Detail |
---|
public PacketGetData()
public PacketGetData(byte[] binary)
binary
- Packet binary data as byte arrayMethod Detail |
---|
public int getSize()
public int getType(int index)
index
- Index of inventory vector
public java.lang.String getHash(int index)
index
- Index of inventory vector
public void addInv(int type, java.lang.String hash)
type
- Type
of datahash
- Data's 32-digit hexadecimal hashpublic byte[] getBinary()
Packet
getBinary
in class Packet
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |