类 NBungeeByteBuf
java.lang.Object
cn.afternode.commons.bungee.messaging.NBungeeByteBuf
Netty version of BungeeByteBuffer
No need to shade netty, it's provided by proxy server
No need to shade netty, it's provided by proxy server
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明io.netty.buffer.ByteBufdirect()Access to source netty ByteBuf directlyvoidread(byte[] dest) Read byte arraybyte[]read(int size) Read byte array with specified sizebyte[]Read byte array in a blockbyte[]Read byte array in a large block<T extends Enum<?>>
TRead enumeration object (1 short integer)intreadInt()Read integerlongreadLong()Read long integernet.md_5.bungee.api.connection.ProxiedPlayerRead player (UUID)shortRead shortRead UTF-8 StringreadUUID()Read UUID (2 long integers)byte[]toArray()Convert to byte arrayvoidwrite(byte[] data) Write byte arrayvoidwriteBlock(byte[] data) Write byte array in a blockvoidwriteBlockL(byte[] data) Write byte array in a large blockvoidWrite enumeration object (1 short integer)voidwriteInt(int data) Write integervoidwriteLong(long data) Write long integervoidwritePlayer(net.md_5.bungee.api.connection.ProxiedPlayer player) Write player (UUID)voidwriteShort(short data) Write shortvoidwriteString(String data) Write UTF-8 stringvoidWrite UUID (2 long integers)
-
构造器详细资料
-
NBungeeByteBuf
public NBungeeByteBuf(byte[] data) -
NBungeeByteBuf
public NBungeeByteBuf()
-
-
方法详细资料
-
read
public void read(byte[] dest) Read byte array- 参数:
dest- Destination
-
write
public void write(byte[] data) Write byte array- 参数:
data- Data
-
read
public byte[] read(int size) Read byte array with specified size- 参数:
size- Size- 返回:
- Result
-
readBlock
public byte[] readBlock()Read byte array in a block- 返回:
- Result
-
writeBlock
public void writeBlock(byte[] data) Write byte array in a block- 参数:
data- Block
-
readBlockL
public byte[] readBlockL()Read byte array in a large block- 返回:
- Result
-
writeBlockL
public void writeBlockL(byte[] data) Write byte array in a large block- 参数:
data- Data
-
readShort
public short readShort()Read short- 返回:
- result
-
writeShort
public void writeShort(short data) Write short- 参数:
data- data
-
readInt
public int readInt()Read integer- 返回:
- result
-
writeInt
public void writeInt(int data) Write integer- 参数:
data- result
-
readLong
public long readLong()Read long integer- 返回:
- result
-
writeLong
public void writeLong(long data) Write long integer- 参数:
data- data
-
readString
Read UTF-8 String- 返回:
- result
-
writeString
Write UTF-8 string- 参数:
data- data
-
writeEnum
Write enumeration object (1 short integer)- 参数:
e- object
-
readEnum
Read enumeration object (1 short integer)- 类型参数:
T- Type- 参数:
clazz- Type- 返回:
- result
-
readUUID
Read UUID (2 long integers)- 返回:
- result
-
writeUUID
Write UUID (2 long integers)- 参数:
uuid- object
-
readPlayer
public net.md_5.bungee.api.connection.ProxiedPlayer readPlayer()Read player (UUID)- 返回:
- result (online only)
-
writePlayer
public void writePlayer(net.md_5.bungee.api.connection.ProxiedPlayer player) Write player (UUID)- 参数:
player- result
-
direct
public io.netty.buffer.ByteBuf direct()Access to source netty ByteBuf directly- 返回:
- source
-
toArray
public byte[] toArray()Convert to byte array- 返回:
- result
-