Package org.restheart.utils
Class BuffersUtils
java.lang.Object
org.restheart.utils.BuffersUtils
- Author:
- Andrea Di Cesare <andrea@softinstigate.com>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intappend(ByteBuffer src, io.undertow.connector.PooledByteBuffer[] dest, io.undertow.server.HttpServerExchange exchange) append the src data to the pooled buffersstatic voidstatic byte[]toByteArray(io.undertow.connector.PooledByteBuffer[] srcs) static ByteBuffertoByteBuffer(io.undertow.connector.PooledByteBuffer[] srcs) static Stringstatic Stringstatic inttransfer(io.undertow.connector.PooledByteBuffer[] src, io.undertow.connector.PooledByteBuffer[] dest, io.undertow.server.HttpServerExchange exchange) static inttransfer(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 Details
-
BuffersUtils
public BuffersUtils()
-
-
Method Details
-
toByteBuffer
public static ByteBuffer toByteBuffer(io.undertow.connector.PooledByteBuffer[] srcs) throws IOException - Parameters:
srcs-- Returns:
- Throws:
IOException
-
toByteArray
- Throws:
IOException
-
toString
public static String toString(io.undertow.connector.PooledByteBuffer[] srcs, Charset cs) throws IOException - Throws:
IOException
-
toString
- 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
-
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)
-