Class ByteBufs


  • public class ByteBufs
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      ByteBufs()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static io.netty.buffer.ByteBuf[] allocAll​(io.netty.buffer.ByteBufAllocator alloc, int count)  
      static io.netty.buffer.ByteBuf[] duplicateAll​(io.netty.buffer.ByteBuf[] buffers)  
      static io.netty.buffer.ByteBuf[] encode​(io.netty.buffer.ByteBufAllocator alloc, java.lang.CharSequence[] textBuffers)  
      static java.lang.Object lengthDecode​(io.netty.buffer.ByteBuf buffer, ByteBufs.DecodeFunction decode)  
      static java.lang.Object lengthDecodeBinary​(Type.Codec.Decoder<io.netty.buffer.ByteBuf> decoder, Context context, Type type, java.lang.Short typeLength, java.lang.Integer typeModifier, io.netty.buffer.ByteBuf buffer, java.lang.Class<?> targetClass, java.lang.Object targetContext)  
      static int lengthEncode​(io.netty.buffer.ByteBuf buffer, java.lang.Object value, ByteBufs.EncodeFunction encode)  
      static void lengthEncodeBinary​(Type.Codec.Encoder<io.netty.buffer.ByteBuf> encoder, Context context, Type type, java.lang.Object value, java.lang.Object sourceContext, io.netty.buffer.ByteBuf buffer)  
      static java.lang.String readCString​(io.netty.buffer.ByteBuf buffer, java.nio.charset.Charset charset)  
      static void releaseAll​(io.netty.buffer.ByteBuf[] byteBufs)  
      static io.netty.buffer.ByteBuf[] retainedDuplicateAll​(io.netty.buffer.ByteBuf[] buffers)  
      static void writeCString​(io.netty.buffer.ByteBuf buffer, byte[] valBytes)  
      static void writeCString​(io.netty.buffer.ByteBuf buffer, java.lang.String val, java.nio.charset.Charset charset)  
      • Methods inherited from class java.lang.Object

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

      • ByteBufs

        public ByteBufs()
    • Method Detail

      • allocAll

        public static io.netty.buffer.ByteBuf[] allocAll​(io.netty.buffer.ByteBufAllocator alloc,
                                                         int count)
      • duplicateAll

        public static io.netty.buffer.ByteBuf[] duplicateAll​(io.netty.buffer.ByteBuf[] buffers)
      • retainedDuplicateAll

        public static io.netty.buffer.ByteBuf[] retainedDuplicateAll​(io.netty.buffer.ByteBuf[] buffers)
      • releaseAll

        public static void releaseAll​(io.netty.buffer.ByteBuf[] byteBufs)
      • encode

        public static io.netty.buffer.ByteBuf[] encode​(io.netty.buffer.ByteBufAllocator alloc,
                                                       java.lang.CharSequence[] textBuffers)
      • lengthEncodeBinary

        public static void lengthEncodeBinary​(Type.Codec.Encoder<io.netty.buffer.ByteBuf> encoder,
                                              Context context,
                                              Type type,
                                              java.lang.Object value,
                                              java.lang.Object sourceContext,
                                              io.netty.buffer.ByteBuf buffer)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • lengthEncode

        public static int lengthEncode​(io.netty.buffer.ByteBuf buffer,
                                       java.lang.Object value,
                                       ByteBufs.EncodeFunction encode)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • lengthDecodeBinary

        public static java.lang.Object lengthDecodeBinary​(Type.Codec.Decoder<io.netty.buffer.ByteBuf> decoder,
                                                          Context context,
                                                          Type type,
                                                          java.lang.Short typeLength,
                                                          java.lang.Integer typeModifier,
                                                          io.netty.buffer.ByteBuf buffer,
                                                          java.lang.Class<?> targetClass,
                                                          java.lang.Object targetContext)
                                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • lengthDecode

        public static java.lang.Object lengthDecode​(io.netty.buffer.ByteBuf buffer,
                                                    ByteBufs.DecodeFunction decode)
                                             throws java.io.IOException
        Throws:
        java.io.IOException
      • readCString

        public static java.lang.String readCString​(io.netty.buffer.ByteBuf buffer,
                                                   java.nio.charset.Charset charset)
      • writeCString

        public static void writeCString​(io.netty.buffer.ByteBuf buffer,
                                        java.lang.String val,
                                        java.nio.charset.Charset charset)
      • writeCString

        public static void writeCString​(io.netty.buffer.ByteBuf buffer,
                                        byte[] valBytes)