Class BufferUtils


  • public final class BufferUtils
    extends java.lang.Object
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static interface  BufferUtils.Parser<T,​E extends java.lang.Exception>  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static byte[] bytes​(io.netty.buffer.ByteBuf buffer, int size)  
      static <R> R peek​(io.netty.buffer.ByteBuf buffer, java.util.function.Function<io.netty.buffer.ByteBuf,​R> consumer)  
      static <T,​E extends java.lang.Exception>
      java.util.List<T>
      repeatCount​(io.netty.buffer.ByteBuf buffer, int count, BufferUtils.Parser<T,​E> parser)  
      static <T,​E extends java.lang.Exception>
      java.util.List<T>
      repeatRemaining​(io.netty.buffer.ByteBuf buffer, BufferUtils.Parser<T,​E> parser)  
      static float sfloat​(io.netty.buffer.ByteBuf buffer)  
      static java.lang.Long sint​(io.netty.buffer.ByteBuf buffer, int octets)  
      static java.lang.Integer sint16​(io.netty.buffer.ByteBuf buffer)  
      static java.lang.Integer sint24​(io.netty.buffer.ByteBuf buffer)  
      static java.lang.Integer sint32​(io.netty.buffer.ByteBuf buffer)  
      static java.lang.Long sint64​(io.netty.buffer.ByteBuf buffer)  
      static java.lang.Integer sint8​(io.netty.buffer.ByteBuf buffer)  
      static void skip​(io.netty.buffer.ByteBuf buffer, int size)  
      static io.netty.buffer.ByteBuf slice​(io.netty.buffer.ByteBuf buffer, int size)  
      static com.google.common.primitives.UnsignedLong uint​(io.netty.buffer.ByteBuf buffer, int octets)  
      static int uint16​(io.netty.buffer.ByteBuf buffer)  
      static int uint24​(io.netty.buffer.ByteBuf buffer)  
      static long uint32​(io.netty.buffer.ByteBuf buffer)  
      static com.google.common.primitives.UnsignedLong uint64​(io.netty.buffer.ByteBuf buffer)  
      static int uint8​(io.netty.buffer.ByteBuf buffer)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • slice

        public static io.netty.buffer.ByteBuf slice​(io.netty.buffer.ByteBuf buffer,
                                                    int size)
      • peek

        public static <R> R peek​(io.netty.buffer.ByteBuf buffer,
                                 java.util.function.Function<io.netty.buffer.ByteBuf,​R> consumer)
      • sfloat

        public static float sfloat​(io.netty.buffer.ByteBuf buffer)
      • uint

        public static com.google.common.primitives.UnsignedLong uint​(io.netty.buffer.ByteBuf buffer,
                                                                     int octets)
      • sint

        public static java.lang.Long sint​(io.netty.buffer.ByteBuf buffer,
                                          int octets)
      • uint8

        public static int uint8​(io.netty.buffer.ByteBuf buffer)
      • uint16

        public static int uint16​(io.netty.buffer.ByteBuf buffer)
      • uint24

        public static int uint24​(io.netty.buffer.ByteBuf buffer)
      • uint32

        public static long uint32​(io.netty.buffer.ByteBuf buffer)
      • uint64

        public static com.google.common.primitives.UnsignedLong uint64​(io.netty.buffer.ByteBuf buffer)
      • sint8

        public static java.lang.Integer sint8​(io.netty.buffer.ByteBuf buffer)
      • sint16

        public static java.lang.Integer sint16​(io.netty.buffer.ByteBuf buffer)
      • sint24

        public static java.lang.Integer sint24​(io.netty.buffer.ByteBuf buffer)
      • sint32

        public static java.lang.Integer sint32​(io.netty.buffer.ByteBuf buffer)
      • sint64

        public static java.lang.Long sint64​(io.netty.buffer.ByteBuf buffer)
      • bytes

        public static byte[] bytes​(io.netty.buffer.ByteBuf buffer,
                                   int size)
      • skip

        public static void skip​(io.netty.buffer.ByteBuf buffer,
                                int size)
      • repeatRemaining

        public static <T,​E extends java.lang.Exception> java.util.List<T> repeatRemaining​(io.netty.buffer.ByteBuf buffer,
                                                                                                BufferUtils.Parser<T,​E> parser)
                                                                                         throws E extends java.lang.Exception
        Throws:
        E extends java.lang.Exception
      • repeatCount

        public static <T,​E extends java.lang.Exception> java.util.List<T> repeatCount​(io.netty.buffer.ByteBuf buffer,
                                                                                            int count,
                                                                                            BufferUtils.Parser<T,​E> parser)
                                                                                     throws E extends java.lang.Exception
        Throws:
        E extends java.lang.Exception