Class NettyUtils
- java.lang.Object
-
- de.dytanic.cloudnet.driver.network.netty.NettyUtils
-
public final class NettyUtils extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Class<? extends io.netty.channel.socket.ServerSocketChannel>getServerSocketChannelClass()static java.lang.Class<? extends io.netty.channel.socket.SocketChannel>getSocketChannelClass()static io.netty.channel.EventLoopGroupnewEventLoopGroup()static java.lang.StringreadString(io.netty.buffer.ByteBuf byteBuf)static intreadVarInt(io.netty.buffer.ByteBuf byteBuf)static longreadVarLong(io.netty.buffer.ByteBuf byteBuf)static java.util.concurrent.ThreadFactorythreadFactory()static byte[]toByteArray(io.netty.buffer.ByteBuf byteBuf, int size)static io.netty.buffer.ByteBufwriteString(io.netty.buffer.ByteBuf byteBuf, java.lang.String string)static io.netty.buffer.ByteBufwriteVarInt(io.netty.buffer.ByteBuf byteBuf, int value)static io.netty.buffer.ByteBufwriteVarLong(io.netty.buffer.ByteBuf byteBuf, long value)
-
-
-
Method Detail
-
newEventLoopGroup
public static io.netty.channel.EventLoopGroup newEventLoopGroup()
-
getSocketChannelClass
public static java.lang.Class<? extends io.netty.channel.socket.SocketChannel> getSocketChannelClass()
-
getServerSocketChannelClass
public static java.lang.Class<? extends io.netty.channel.socket.ServerSocketChannel> getServerSocketChannelClass()
-
threadFactory
public static java.util.concurrent.ThreadFactory threadFactory()
-
toByteArray
public static byte[] toByteArray(io.netty.buffer.ByteBuf byteBuf, int size)
-
readVarInt
public static int readVarInt(io.netty.buffer.ByteBuf byteBuf)
-
readVarLong
public static long readVarLong(io.netty.buffer.ByteBuf byteBuf)
-
writeVarInt
public static io.netty.buffer.ByteBuf writeVarInt(io.netty.buffer.ByteBuf byteBuf, int value)
-
writeVarLong
public static io.netty.buffer.ByteBuf writeVarLong(io.netty.buffer.ByteBuf byteBuf, long value)
-
writeString
public static io.netty.buffer.ByteBuf writeString(io.netty.buffer.ByteBuf byteBuf, java.lang.String string)
-
readString
public static java.lang.String readString(io.netty.buffer.ByteBuf byteBuf)
-
-