Class 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.EventLoopGroup newEventLoopGroup()  
      static java.lang.String readString​(io.netty.buffer.ByteBuf byteBuf)  
      static int readVarInt​(io.netty.buffer.ByteBuf byteBuf)  
      static long readVarLong​(io.netty.buffer.ByteBuf byteBuf)  
      static java.util.concurrent.ThreadFactory threadFactory()  
      static byte[] toByteArray​(io.netty.buffer.ByteBuf byteBuf, int size)  
      static io.netty.buffer.ByteBuf writeString​(io.netty.buffer.ByteBuf byteBuf, java.lang.String string)  
      static io.netty.buffer.ByteBuf writeVarInt​(io.netty.buffer.ByteBuf byteBuf, int value)  
      static io.netty.buffer.ByteBuf writeVarLong​(io.netty.buffer.ByteBuf byteBuf, long value)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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)