Class BuffersUtils


  • public class BuffersUtils
    extends Object
    Author:
    Andrea Di Cesare
    • Constructor Summary

      Constructors 
      Constructor Description
      BuffersUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int append​(ByteBuffer src, io.undertow.connector.PooledByteBuffer[] dest, io.undertow.server.HttpServerExchange exchange)
      append the src data to the pooled buffers
      static void dump​(String msg, io.undertow.connector.PooledByteBuffer[] data)  
      static byte[] toByteArray​(io.undertow.connector.PooledByteBuffer[] srcs)  
      static ByteBuffer toByteBuffer​(io.undertow.connector.PooledByteBuffer[] srcs)  
      static String toString​(byte[] src, Charset cs)  
      static String toString​(io.undertow.connector.PooledByteBuffer[] srcs, Charset cs)  
      static int transfer​(io.undertow.connector.PooledByteBuffer[] src, io.undertow.connector.PooledByteBuffer[] dest, io.undertow.server.HttpServerExchange exchange)  
      static int transfer​(ByteBuffer src, io.undertow.connector.PooledByteBuffer[] dest, io.undertow.server.HttpServerExchange exchange)
      transfer the src data to the pooled buffers overwriting the exising data
    • Constructor Detail

      • BuffersUtils

        public BuffersUtils()
    • Method Detail

      • toByteBuffer

        public static ByteBuffer toByteBuffer​(io.undertow.connector.PooledByteBuffer[] srcs)
                                       throws IOException
        Parameters:
        srcs -
        Returns:
        Throws:
        IOException
      • toByteArray

        public static byte[] toByteArray​(io.undertow.connector.PooledByteBuffer[] srcs)
                                  throws IOException
        Throws:
        IOException
      • transfer

        public static int transfer​(ByteBuffer src,
                                   io.undertow.connector.PooledByteBuffer[] dest,
                                   io.undertow.server.HttpServerExchange exchange)
        transfer the src data to the pooled buffers overwriting the exising data
        Parameters:
        src -
        dest -
        exchange -
        Returns:
      • dump

        public static void dump​(String msg,
                                io.undertow.connector.PooledByteBuffer[] data)
      • append

        public static int append​(ByteBuffer src,
                                 io.undertow.connector.PooledByteBuffer[] dest,
                                 io.undertow.server.HttpServerExchange exchange)
        append the src data to the pooled buffers
        Parameters:
        src -
        dest -
        exchange -
        Returns:
      • transfer

        public static int transfer​(io.undertow.connector.PooledByteBuffer[] src,
                                   io.undertow.connector.PooledByteBuffer[] dest,
                                   io.undertow.server.HttpServerExchange exchange)