Package io.github.joealisson.mmocore
Class PacketBuffer
- java.lang.Object
-
- io.github.joealisson.mmocore.PacketBuffer
-
public class PacketBuffer extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]expose()byteread()Reads raw byte from the bufferintreadInt()Reads int from the buffer.shortreadShort()Reads short from the buffer.intremaining()
-
-
-
Method Detail
-
read
public byte read()
Reads raw byte from the buffer- Returns:
- byte read
-
readShort
public short readShort()
Reads short from the buffer.
16bit integer (00 00)- Returns:
- short read
-
readInt
public final int readInt()
Reads int from the buffer.
32bit integer (00 00 00 00)- Returns:
- int read
-
expose
public byte[] expose()
-
remaining
public int remaining()
-
-