|
RuneHive-Game
|
Represents a single game packet. More...
Public Member Functions | |
| GamePacket (final int opcode, final PacketType header, final ByteBuf payload) | |
Creates a GamePacket. | |
| PacketType | getHeader () |
| Gets the type. | |
| int | getOpcode () |
| Gets the opcode. | |
| ByteBuf | getPayload () |
| Gets the payload. | |
| String | getRS2String () |
| Reads a RuneScape string. | |
| int | getSize () |
| Gets the size of this payload. | |
| int | readByte () |
Reads a STANDARD signed byte from the payload. | |
| int | readByte (boolean signed) |
Reads a STANDARD byte from the payload. | |
| int | readByte (boolean signed, ByteModification mod) |
| Reads a single byte from the payload. | |
| int | readByte (ByteModification mod) |
Reads a signed byte from the payload. | |
| byte[] | readBytes (int amount) |
| Reads the amount of bytes into the array, starting at the current position. | |
| byte[] | readBytes (int amount, ByteModification mod) |
| Reads a series of bytes from a buffer. | |
| byte[] | readBytesReverse (int amount) |
| Reads a series of bytes in reverse. | |
| byte[] | readBytesReverse (int amount, ByteModification mod) |
| Reads a series of bytes in reverse. | |
| int | readInt () |
Reads a STANDARD signed integer value from the payload in BIG order. | |
| int | readInt (boolean signed) |
Reads a STANDARD integer value from the payload in BIG order. | |
| int | readInt (boolean signed, ByteModification mod) |
Reads an integer value from the payload in BIG order. | |
| int | readInt (boolean signed, ByteOrder order) |
Reads a STANDARD integer value from the payload. | |
| int | readInt (boolean signed, ByteOrder order, ByteModification mod) |
| Reads an integer value from the payload. | |
| int | readInt (ByteModification mod) |
Reads a signed integer value from the payload in ByteOrder BIG order. | |
| long | readLong () |
Reads a STANDARD signed long value from the payload in BIG order. | |
| long | readLong (boolean signed) |
Reads a STANDARD long value from the payload in BIG order. | |
| long | readLong (boolean signed, ByteModification mod) |
Reads a long value from the payload in BIG order. | |
| long | readLong (boolean signed, ByteOrder order) |
Reads a STANDARD long value from the payload. | |
| long | readLong (boolean signed, ByteOrder order, ByteModification mod) |
| Reads a long value from the payload. | |
| long | readLong (ByteModification mod) |
Reads a signed long value from the payload in BIG order. | |
| int | readShort () |
Reads a STANDARD signed short value from the payload in BIG order. | |
| int | readShort (boolean signed) |
Reads a STANDARD short value from the payload in BIG order. | |
| int | readShort (boolean signed, ByteModification mod) |
Reads a short value from the payload in BIG order. | |
| int | readShort (boolean signed, ByteOrder order) |
Reads a STANDARD short value from the payload. | |
| int | readShort (boolean signed, ByteOrder order, ByteModification mod) |
| Reads a short value from the payload. | |
| int | readShort (ByteModification mod) |
Reads a signed short value from the payload BIG order. | |
| int | readShort (ByteOrder order) |
Reads a STANDARD signed short value from the payload. | |
| int | readShort (ByteOrder order, ByteModification mod) |
Reads a signed short value from the payload. | |
| String | toString () |
Private Attributes | |
| final PacketType | header |
| The header for this packet. | |
| final int | opcode |
| The opcode for this packet. | |
| final ByteBuf | payload |
| The buffer that contains the data for this packet. | |
| final int | size |
| The size of this packet. | |
Represents a single game packet.
Definition at line 13 of file GamePacket.java.
| com.runehive.net.packet.GamePacket.GamePacket | ( | final int | opcode, |
| final PacketType | header, | ||
| final ByteBuf | payload ) |
Creates a GamePacket.
| opcode | The opcode. |
| header | The header. |
| payload | The payload. |
Definition at line 45 of file GamePacket.java.
| PacketType com.runehive.net.packet.GamePacket.getHeader | ( | ) |
Gets the type.
Definition at line 77 of file GamePacket.java.
References header.
| int com.runehive.net.packet.GamePacket.getOpcode | ( | ) |
Gets the opcode.
Definition at line 68 of file GamePacket.java.
References opcode.
| ByteBuf com.runehive.net.packet.GamePacket.getPayload | ( | ) |
Gets the payload.
Definition at line 86 of file GamePacket.java.
References payload.
| String com.runehive.net.packet.GamePacket.getRS2String | ( | ) |
Reads a RuneScape string.
Definition at line 600 of file GamePacket.java.
References payload.
| int com.runehive.net.packet.GamePacket.getSize | ( | ) |
Gets the size of this payload.
Definition at line 59 of file GamePacket.java.
References size.
| int com.runehive.net.packet.GamePacket.readByte | ( | ) |
Reads a STANDARD signed byte from the payload.
Definition at line 95 of file GamePacket.java.
References payload.
Referenced by readByte(), readByte(), readBytes(), readInt(), readLong(), and readShort().
| int com.runehive.net.packet.GamePacket.readByte | ( | boolean signed | ) |
Reads a STANDARD byte from the payload.
| signed | The flag that denotes this value is signed. |
Definition at line 107 of file GamePacket.java.
References com.runehive.net.codec.ByteModification.NONE, and readByte().
| int com.runehive.net.packet.GamePacket.readByte | ( | boolean signed | , |
| ByteModification | mod ) |
Reads a single byte from the payload.
| signed | The flag that denotes this value is signed. |
| mod | The modification performed on this value. |
Definition at line 134 of file GamePacket.java.
References payload.
| int com.runehive.net.packet.GamePacket.readByte | ( | ByteModification | mod | ) |
Reads a signed byte from the payload.
| mod | The modification performed on this value. |
Definition at line 119 of file GamePacket.java.
References readByte().
| byte[] com.runehive.net.packet.GamePacket.readBytes | ( | int | amount | ) |
Reads the amount of bytes into the array, starting at the current position.
| amount | the amount to read. |
Definition at line 518 of file GamePacket.java.
References com.runehive.net.codec.ByteModification.NONE, and readBytes().
Referenced by readBytes().
| byte[] com.runehive.net.packet.GamePacket.readBytes | ( | int | amount, |
| ByteModification | mod ) |
Reads a series of bytes from a buffer.
| amount | The amount of bytes to read. |
| mod | The modifications performed on the bytes values. |
Definition at line 533 of file GamePacket.java.
References readByte().
| byte[] com.runehive.net.packet.GamePacket.readBytesReverse | ( | int | amount | ) |
Reads a series of bytes in reverse.
| amount | The amount of bytes to read. |
Definition at line 549 of file GamePacket.java.
References com.runehive.net.codec.ByteModification.NONE, and readBytesReverse().
Referenced by readBytesReverse().
| byte[] com.runehive.net.packet.GamePacket.readBytesReverse | ( | int | amount, |
| ByteModification | mod ) |
Reads a series of bytes in reverse.
| amount | The amount of bytes to read. |
| mod | The modification performed on these bytes. |
Definition at line 564 of file GamePacket.java.
References payload.
| int com.runehive.net.packet.GamePacket.readInt | ( | ) |
Reads a STANDARD signed integer value from the payload in BIG order.
Definition at line 290 of file GamePacket.java.
References com.runehive.net.codec.ByteOrder.BE, com.runehive.net.codec.ByteModification.NONE, and readInt().
Referenced by readInt(), readInt(), readInt(), readInt(), and readInt().
| int com.runehive.net.packet.GamePacket.readInt | ( | boolean signed | ) |
Reads a STANDARD integer value from the payload in BIG order.
| signed | The flag that denotes this value is signed. |
Definition at line 303 of file GamePacket.java.
References com.runehive.net.codec.ByteOrder.BE, com.runehive.net.codec.ByteModification.NONE, and readInt().
| int com.runehive.net.packet.GamePacket.readInt | ( | boolean signed | , |
| ByteModification | mod ) |
Reads an integer value from the payload in BIG order.
| signed | The flag that denotes this value is signed. |
| mod | The modifications performed on this value. |
Definition at line 331 of file GamePacket.java.
References com.runehive.net.codec.ByteOrder.BE, and readInt().
| int com.runehive.net.packet.GamePacket.readInt | ( | boolean signed | , |
| ByteOrder | order ) |
Reads a STANDARD integer value from the payload.
| signed | The flag that denotes this value is signed. |
| order | The order in which the value is written. |
Definition at line 346 of file GamePacket.java.
References com.runehive.net.codec.ByteModification.NONE, and readInt().
| int com.runehive.net.packet.GamePacket.readInt | ( | boolean signed | , |
| ByteOrder | order, | ||
| ByteModification | mod ) |
Reads an integer value from the payload.
| signed | The flag that denotes this value is signed. |
| order | The order in which the value is written. |
| mod | The modifications performed on this value. |
Definition at line 364 of file GamePacket.java.
References readByte().
| int com.runehive.net.packet.GamePacket.readInt | ( | ByteModification | mod | ) |
Reads a signed integer value from the payload in ByteOrder BIG order.
| mod | The modifications performed on this value. |
Definition at line 316 of file GamePacket.java.
References com.runehive.net.codec.ByteOrder.BE, and readInt().
| long com.runehive.net.packet.GamePacket.readLong | ( | ) |
Reads a STANDARD signed long value from the payload in BIG order.
Definition at line 404 of file GamePacket.java.
References com.runehive.net.codec.ByteOrder.BE, com.runehive.net.codec.ByteModification.NONE, and readLong().
Referenced by readLong(), readLong(), readLong(), readLong(), and readLong().
| long com.runehive.net.packet.GamePacket.readLong | ( | boolean signed | ) |
Reads a STANDARD long value from the payload in BIG order.
| signed | The flag that denotes this value is signed. |
Definition at line 417 of file GamePacket.java.
References com.runehive.net.codec.ByteOrder.BE, com.runehive.net.codec.ByteModification.NONE, and readLong().
| long com.runehive.net.packet.GamePacket.readLong | ( | boolean signed | , |
| ByteModification | mod ) |
Reads a long value from the payload in BIG order.
| signed | The flag that denotes this value is signed. |
| mod | The modifications performed on this value. |
Definition at line 444 of file GamePacket.java.
References com.runehive.net.codec.ByteOrder.BE, and readLong().
| long com.runehive.net.packet.GamePacket.readLong | ( | boolean signed | , |
| ByteOrder | order ) |
Reads a STANDARD long value from the payload.
| signed | The flag that denotes this value is signed. |
| order | The order in which the value is written. |
Definition at line 459 of file GamePacket.java.
References com.runehive.net.codec.ByteModification.NONE, and readLong().
| long com.runehive.net.packet.GamePacket.readLong | ( | boolean signed | , |
| ByteOrder | order, | ||
| ByteModification | mod ) |
Reads a long value from the payload.
| signed | The flag that denotes this value is signed. |
| order | The order in which the value is written. |
| mod | The modifications performed on this value. |
Definition at line 477 of file GamePacket.java.
References readByte().
| long com.runehive.net.packet.GamePacket.readLong | ( | ByteModification | mod | ) |
Reads a signed long value from the payload in BIG order.
| mod | The modifications performed on this value. |
Definition at line 429 of file GamePacket.java.
References com.runehive.net.codec.ByteOrder.BE, and readLong().
| int com.runehive.net.packet.GamePacket.readShort | ( | ) |
Reads a STANDARD signed short value from the payload in BIG order.
Definition at line 162 of file GamePacket.java.
References payload.
Referenced by readShort(), readShort(), readShort(), readShort(), readShort(), and readShort().
| int com.runehive.net.packet.GamePacket.readShort | ( | boolean signed | ) |
Reads a STANDARD short value from the payload in BIG order.
| signed | The flag that denotes this value is signed. |
Definition at line 175 of file GamePacket.java.
References com.runehive.net.codec.ByteOrder.BE, com.runehive.net.codec.ByteModification.NONE, and readShort().
| int com.runehive.net.packet.GamePacket.readShort | ( | boolean signed | , |
| ByteModification | mod ) |
Reads a short value from the payload in BIG order.
| signed | The flag that denotes this value is signed. |
| mod | The modifications performed on this value. |
Definition at line 244 of file GamePacket.java.
References com.runehive.net.codec.ByteOrder.BE, and readShort().
| int com.runehive.net.packet.GamePacket.readShort | ( | boolean signed | , |
| ByteOrder | order ) |
Reads a STANDARD short value from the payload.
| signed | The flag that denotes this value is signed. |
| order | The order in which this value is written. |
Definition at line 202 of file GamePacket.java.
References com.runehive.net.codec.ByteModification.NONE, and readShort().
| int com.runehive.net.packet.GamePacket.readShort | ( | boolean signed | , |
| ByteOrder | order, | ||
| ByteModification | mod ) |
Reads a short value from the payload.
| signed | The flag that denotes this value is signed. |
| order | The order in which the value is written. |
| mod | The modifications performed on this value. |
Definition at line 262 of file GamePacket.java.
References readByte().
| int com.runehive.net.packet.GamePacket.readShort | ( | ByteModification | mod | ) |
Reads a signed short value from the payload BIG order.
| mod | The modifications performed on this value. |
Definition at line 229 of file GamePacket.java.
References com.runehive.net.codec.ByteOrder.BE, and readShort().
| int com.runehive.net.packet.GamePacket.readShort | ( | ByteOrder | order | ) |
Reads a STANDARD signed short value from the payload.
| order | The order in which this value is written. |
Definition at line 187 of file GamePacket.java.
References com.runehive.net.codec.ByteModification.NONE, and readShort().
| int com.runehive.net.packet.GamePacket.readShort | ( | ByteOrder | order, |
| ByteModification | mod ) |
Reads a signed short value from the payload.
| order | The order in which this value is written. |
| mod | The modifications performed on this value. |
Definition at line 217 of file GamePacket.java.
References readShort().
| String com.runehive.net.packet.GamePacket.toString | ( | ) |
Definition at line 610 of file GamePacket.java.
|
private |
The header for this packet.
Definition at line 23 of file GamePacket.java.
Referenced by GamePacket(), getHeader(), and toString().
|
private |
The opcode for this packet.
Definition at line 18 of file GamePacket.java.
Referenced by GamePacket(), getOpcode(), and toString().
|
private |
The buffer that contains the data for this packet.
Definition at line 28 of file GamePacket.java.
Referenced by GamePacket(), getPayload(), getRS2String(), readByte(), readByte(), readBytesReverse(), and readShort().
|
private |
The size of this packet.
Definition at line 33 of file GamePacket.java.
Referenced by getSize(), and toString().