| Modifier and Type | Method and Description |
|---|---|
static io.netty.buffer.ByteBuf |
composite(List<io.netty.buffer.ByteBuf> parts)
Combine
ByteBufs through composite buffer. |
static Flux<io.netty.buffer.ByteBuf> |
readFile(Path path,
io.netty.buffer.ByteBufAllocator allocator,
int bufferSize)
Reads all bytes from a file asynchronously.
|
static void |
releaseAll(io.asyncer.r2dbc.mysql.message.FieldValue[] fields) |
static void |
releaseAll(io.asyncer.r2dbc.mysql.message.FieldValue[] fields,
int bound) |
static void |
releaseAll(List<? extends io.netty.util.ReferenceCounted> parts) |
static void |
releaseAll(List<? extends io.netty.util.ReferenceCounted> parts,
int bound) |
static void |
releaseAll(io.netty.util.ReferenceCounted[] parts) |
public static Flux<io.netty.buffer.ByteBuf> readFile(Path path, io.netty.buffer.ByteBufAllocator allocator, int bufferSize)
path - The path of the file want to be read.allocator - The ByteBufAllocator used to allocate ByteBufs.bufferSize - The size of the buffer used to read the file.Flux emits ByteBufs read from the file.public static io.netty.buffer.ByteBuf composite(List<io.netty.buffer.ByteBuf> parts)
ByteBufs through composite buffer.
This method would release all ByteBufs when any exception throws.
parts - The ByteBufs want to be wrap, it can not be empty, and it will be cleared.ByteBuf holds the all bytes of given parts, it may be a read-only buffer.public static void releaseAll(io.netty.util.ReferenceCounted[] parts)
public static void releaseAll(io.asyncer.r2dbc.mysql.message.FieldValue[] fields)
public static void releaseAll(List<? extends io.netty.util.ReferenceCounted> parts)
public static void releaseAll(io.asyncer.r2dbc.mysql.message.FieldValue[] fields,
int bound)
public static void releaseAll(List<? extends io.netty.util.ReferenceCounted> parts, int bound)
Copyright © 2018–2024 asyncer.io. All rights reserved.