Class NettyUtils


  • @Internal
    public final class NettyUtils
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static io.netty.channel.ChannelFactory<? extends io.netty.channel.Channel> getClientChannelFactory()  
      static io.netty.channel.ChannelFactory<? extends io.netty.channel.ServerChannel> getServerChannelFactory()  
      static java.lang.Class<? extends io.netty.channel.socket.ServerSocketChannel> getServerSocketChannelClass()
      Deprecated.
      static java.lang.Class<? extends io.netty.channel.socket.SocketChannel> getSocketChannelClass()
      Deprecated.
      static int getThreadAmount()  
      static io.netty.channel.EventLoopGroup newEventLoopGroup()  
      static java.util.concurrent.Executor newPacketDispatcher()  
      static byte[] readByteArray​(io.netty.buffer.ByteBuf byteBuf, int size)  
      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)
      Deprecated.
      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()
      • newPacketDispatcher

        public static java.util.concurrent.Executor newPacketDispatcher()
      • getSocketChannelClass

        @Deprecated
        @ScheduledForRemoval
        public static java.lang.Class<? extends io.netty.channel.socket.SocketChannel> getSocketChannelClass()
        Deprecated.
      • getClientChannelFactory

        public static io.netty.channel.ChannelFactory<? extends io.netty.channel.Channel> getClientChannelFactory()
      • getServerSocketChannelClass

        @Deprecated
        @ScheduledForRemoval
        public static java.lang.Class<? extends io.netty.channel.socket.ServerSocketChannel> getServerSocketChannelClass()
        Deprecated.
      • getServerChannelFactory

        public static io.netty.channel.ChannelFactory<? extends io.netty.channel.ServerChannel> getServerChannelFactory()
      • threadFactory

        public static java.util.concurrent.ThreadFactory threadFactory()
      • toByteArray

        @Deprecated
        @ScheduledForRemoval
        public static byte[] toByteArray​(io.netty.buffer.ByteBuf byteBuf,
                                         int size)
        Deprecated.
      • readByteArray

        public static byte[] readByteArray​(io.netty.buffer.ByteBuf byteBuf,
                                           int size)
      • readVarInt

        public static int readVarInt​(io.netty.buffer.ByteBuf byteBuf)
      • writeVarInt

        public static io.netty.buffer.ByteBuf writeVarInt​(io.netty.buffer.ByteBuf byteBuf,
                                                          int value)
      • readVarLong

        public static long readVarLong​(io.netty.buffer.ByteBuf byteBuf)
      • 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)
      • getThreadAmount

        public static int getThreadAmount()