|
| GamePacket (final int opcode, final PacketType header, final ByteBuf payload) |
int | getSize () |
int | getOpcode () |
PacketType | getHeader () |
ByteBuf | getPayload () |
int | readByte () |
int | readByte (boolean signed) |
int | readByte (ByteModification mod) |
int | readByte (boolean signed, ByteModification mod) |
int | readShort () |
int | readShort (boolean signed) |
int | readShort (ByteOrder order) |
int | readShort (boolean signed, ByteOrder order) |
int | readShort (ByteOrder order, ByteModification mod) |
int | readShort (ByteModification mod) |
int | readShort (boolean signed, ByteModification mod) |
int | readShort (boolean signed, ByteOrder order, ByteModification mod) |
int | readInt () |
int | readInt (boolean signed) |
int | readInt (ByteModification mod) |
int | readInt (boolean signed, ByteModification mod) |
int | readInt (boolean signed, ByteOrder order) |
int | readInt (boolean signed, ByteOrder order, ByteModification mod) |
long | readLong () |
long | readLong (boolean signed) |
long | readLong (ByteModification mod) |
long | readLong (boolean signed, ByteModification mod) |
long | readLong (boolean signed, ByteOrder order) |
long | readLong (boolean signed, ByteOrder order, ByteModification mod) |
byte[] | readBytes (int amount) |
byte[] | readBytes (int amount, ByteModification mod) |
byte[] | readBytesReverse (int amount) |
byte[] | readBytesReverse (int amount, ByteModification mod) |
String | getRS2String () |
Represents a single game packet.
- Author
- nshusa
Definition at line 50 of file GamePacket.java.
◆ GamePacket()
com.osroyale.net.packet.GamePacket.GamePacket |
( |
final int | opcode, |
|
|
final PacketType | header, |
|
|
final ByteBuf | payload ) |
|
inline |
Creates a GamePacket
.
- Parameters
-
opcode | The opcode. |
header | The header. |
payload | The payload. |
Definition at line 82 of file GamePacket.java.
◆ getHeader()
PacketType com.osroyale.net.packet.GamePacket.getHeader |
( |
| ) |
|
|
inline |
◆ getOpcode()
int com.osroyale.net.packet.GamePacket.getOpcode |
( |
| ) |
|
|
inline |
◆ getPayload()
ByteBuf com.osroyale.net.packet.GamePacket.getPayload |
( |
| ) |
|
|
inline |
◆ getRS2String()
String com.osroyale.net.packet.GamePacket.getRS2String |
( |
| ) |
|
|
inline |
Reads a RuneScape string.
- Returns
- The string.
Definition at line 637 of file GamePacket.java.
◆ getSize()
int com.osroyale.net.packet.GamePacket.getSize |
( |
| ) |
|
|
inline |
Gets the size of this payload.
- Returns
- The amount of readable bytes.
Definition at line 96 of file GamePacket.java.
◆ readByte() [1/4]
int com.osroyale.net.packet.GamePacket.readByte |
( |
| ) |
|
|
inline |
Reads a STANDARD
signed
byte from the payload.
- Returns
- The byte.
Definition at line 132 of file GamePacket.java.
◆ readByte() [2/4]
int com.osroyale.net.packet.GamePacket.readByte |
( |
boolean signed | | ) |
|
|
inline |
Reads a STANDARD
byte from the payload.
- Parameters
-
signed | The flag that denotes this value is signed. |
- Returns
- The byte.
Definition at line 144 of file GamePacket.java.
◆ readByte() [3/4]
int com.osroyale.net.packet.GamePacket.readByte |
( |
boolean signed | , |
|
|
ByteModification | mod ) |
|
inline |
Reads a single byte from the payload.
- Parameters
-
signed | The flag that denotes this value is signed. |
mod | The modification performed on this value. |
- Returns
- The byte.
Definition at line 171 of file GamePacket.java.
◆ readByte() [4/4]
Reads a signed
byte from the payload.
- Parameters
-
mod | The modification performed on this value. |
- Returns
- The signed byte.
Definition at line 156 of file GamePacket.java.
◆ readBytes() [1/2]
byte[] com.osroyale.net.packet.GamePacket.readBytes |
( |
int | amount | ) |
|
|
inline |
Reads the amount of bytes into the array, starting at the current position.
- Parameters
-
amount | the amount to read. |
- Returns
- a buffer filled with the data.
Definition at line 555 of file GamePacket.java.
◆ readBytes() [2/2]
byte[] com.osroyale.net.packet.GamePacket.readBytes |
( |
int | amount, |
|
|
ByteModification | mod ) |
|
inline |
Reads a series of bytes from a buffer.
- Parameters
-
amount | The amount of bytes to read. |
mod | The modifications performed on the bytes values. |
- Returns
- The bytes that where read.
Definition at line 570 of file GamePacket.java.
◆ readBytesReverse() [1/2]
byte[] com.osroyale.net.packet.GamePacket.readBytesReverse |
( |
int | amount | ) |
|
|
inline |
Reads a series of bytes in reverse.
- Parameters
-
amount | The amount of bytes to read. |
- Returns
- The bytes in reverse.
Definition at line 586 of file GamePacket.java.
◆ readBytesReverse() [2/2]
byte[] com.osroyale.net.packet.GamePacket.readBytesReverse |
( |
int | amount, |
|
|
ByteModification | mod ) |
|
inline |
Reads a series of bytes in reverse.
- Parameters
-
amount | The amount of bytes to read. |
mod | The modification performed on these bytes. |
- Returns
- The bytes in reverse.
Definition at line 601 of file GamePacket.java.
◆ readInt() [1/6]
int com.osroyale.net.packet.GamePacket.readInt |
( |
| ) |
|
|
inline |
Reads a STANDARD
signed
integer value from the payload in BIG
order.
- Returns
- The integer value.
Definition at line 327 of file GamePacket.java.
◆ readInt() [2/6]
int com.osroyale.net.packet.GamePacket.readInt |
( |
boolean signed | | ) |
|
|
inline |
Reads a STANDARD
integer value from the payload in BIG
order.
- Parameters
-
signed | The flag that denotes this value is signed. |
- Returns
- The integer value.
Definition at line 340 of file GamePacket.java.
◆ readInt() [3/6]
int com.osroyale.net.packet.GamePacket.readInt |
( |
boolean signed | , |
|
|
ByteModification | mod ) |
|
inline |
Reads an integer value from the payload in BIG
order.
- Parameters
-
signed | The flag that denotes this value is signed. |
mod | The modifications performed on this value. |
- Returns
- The integer value.
Definition at line 368 of file GamePacket.java.
◆ readInt() [4/6]
int com.osroyale.net.packet.GamePacket.readInt |
( |
boolean signed | , |
|
|
ByteOrder | order ) |
|
inline |
Reads a STANDARD
integer value from the payload.
- Parameters
-
signed | The flag that denotes this value is signed. |
order | The order in which the value is written. |
- Returns
- The integer value.
Definition at line 383 of file GamePacket.java.
◆ readInt() [5/6]
Reads an integer value from the payload.
- Parameters
-
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. |
- Returns
- The integer value.
Definition at line 401 of file GamePacket.java.
◆ readInt() [6/6]
Reads a signed
integer value from the payload in ByteOrder
BIG
order.
- Parameters
-
mod | The modifications performed on this value. |
- Returns
- The integer value.
Definition at line 353 of file GamePacket.java.
◆ readLong() [1/6]
long com.osroyale.net.packet.GamePacket.readLong |
( |
| ) |
|
|
inline |
Reads a STANDARD
signed
long value from the payload in BIG
order.
- Returns
- The long value.
Definition at line 441 of file GamePacket.java.
◆ readLong() [2/6]
long com.osroyale.net.packet.GamePacket.readLong |
( |
boolean signed | | ) |
|
|
inline |
Reads a STANDARD
long value from the payload in BIG
order.
- Parameters
-
signed | The flag that denotes this value is signed. |
- Returns
- The long value.
Definition at line 454 of file GamePacket.java.
◆ readLong() [3/6]
long com.osroyale.net.packet.GamePacket.readLong |
( |
boolean signed | , |
|
|
ByteModification | mod ) |
|
inline |
Reads a long value from the payload in BIG
order.
- Parameters
-
signed | The flag that denotes this value is signed. |
mod | The modifications performed on this value. |
- Returns
- The long value.
Definition at line 481 of file GamePacket.java.
◆ readLong() [4/6]
long com.osroyale.net.packet.GamePacket.readLong |
( |
boolean signed | , |
|
|
ByteOrder | order ) |
|
inline |
Reads a STANDARD
long value from the payload.
- Parameters
-
signed | The flag that denotes this value is signed. |
order | The order in which the value is written. |
- Returns
- The long value.
Definition at line 496 of file GamePacket.java.
◆ readLong() [5/6]
Reads a long value from the payload.
- Parameters
-
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. |
- Returns
- The long value.
Definition at line 514 of file GamePacket.java.
◆ readLong() [6/6]
Reads a signed
long value from the payload in BIG
order.
- Parameters
-
mod | The modifications performed on this value. |
- Returns
- The long value.
Definition at line 466 of file GamePacket.java.
◆ readShort() [1/8]
int com.osroyale.net.packet.GamePacket.readShort |
( |
| ) |
|
|
inline |
Reads a STANDARD
signed
short value from the payload in BIG
order.
- Returns
- The standard signed short value.
Definition at line 199 of file GamePacket.java.
◆ readShort() [2/8]
int com.osroyale.net.packet.GamePacket.readShort |
( |
boolean signed | | ) |
|
|
inline |
Reads a STANDARD
short value from the payload in BIG
order.
- Parameters
-
signed | The flag that denotes this value is signed. |
- Returns
- The standard short value.
Definition at line 212 of file GamePacket.java.
◆ readShort() [3/8]
int com.osroyale.net.packet.GamePacket.readShort |
( |
boolean signed | , |
|
|
ByteModification | mod ) |
|
inline |
Reads a short value from the payload in BIG
order.
- Parameters
-
signed | The flag that denotes this value is signed. |
mod | The modifications performed on this value. |
- Returns
- The short value.
Definition at line 281 of file GamePacket.java.
◆ readShort() [4/8]
int com.osroyale.net.packet.GamePacket.readShort |
( |
boolean signed | , |
|
|
ByteOrder | order ) |
|
inline |
Reads a STANDARD
short value from the payload.
- Parameters
-
signed | The flag that denotes this value is signed. |
order | The order in which this value is written. |
- Returns
- The standard short value.
Definition at line 239 of file GamePacket.java.
◆ readShort() [5/8]
Reads a short value from the payload.
- Parameters
-
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. |
- Returns
- The short value.
Definition at line 299 of file GamePacket.java.
◆ readShort() [6/8]
Reads a signed
short value from the payload BIG
order.
- Parameters
-
mod | The modifications performed on this value. |
- Returns
- The short value.
Definition at line 266 of file GamePacket.java.
◆ readShort() [7/8]
int com.osroyale.net.packet.GamePacket.readShort |
( |
ByteOrder | order | ) |
|
|
inline |
Reads a STANDARD
signed
short value from the payload.
- Parameters
-
order | The order in which this value is written. |
- Returns
- The signed standard short value.
Definition at line 224 of file GamePacket.java.
◆ readShort() [8/8]
Reads a signed
short value from the payload.
- Parameters
-
order | The order in which this value is written. |
mod | The modifications performed on this value. |
- Returns
- The short value.
Definition at line 254 of file GamePacket.java.
The documentation for this class was generated from the following file: