Package io.github.joealisson.mmocore
Interface ReadableBuffer
-
- All Superinterfaces:
Buffer
- All Known Implementing Classes:
ArrayPacketBuffer,SinglePacketBuffer
public interface ReadableBuffer extends Buffer
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static ReadableBufferof(java.nio.ByteBuffer buffer)bytereadByte()Reads raw byte from the buffervoidreadBytes(byte[] dst)voidreadBytes(byte[] dst, int offset, int length)charreadChar()doublereadDouble()floatreadFloat()intreadInt()Reads int from the buffer.longreadLong()shortreadShort()Reads short from the buffer.intremaining()
-
-
-
Method Detail
-
readByte
byte readByte()
Reads raw byte from the buffer- Returns:
- byte read
-
readShort
short readShort()
Reads short from the buffer.
16bit integer (00 00)- Returns:
- short read
-
readChar
char readChar()
-
readInt
int readInt()
Reads int from the buffer.
32bit integer (00 00 00 00)- Returns:
- int read
-
readFloat
float readFloat()
-
readLong
long readLong()
-
readDouble
double readDouble()
-
readBytes
void readBytes(byte[] dst)
-
readBytes
void readBytes(byte[] dst, int offset, int length)
-
remaining
int remaining()
-
of
static ReadableBuffer of(java.nio.ByteBuffer buffer)
-
-