public class AddWritableBuffer extends Object
Constructor and Description |
---|
AddWritableBuffer() |
Modifier and Type | Method and Description |
---|---|
static boolean |
add(io.netty.buffer.ByteBuf buf,
OutputStream stream,
boolean tryZeroCopy)
Add the provided ByteBuf to the gRPC BufferChainOutputStream if possible, else copy the buffer to the stream.
|
public static boolean add(io.netty.buffer.ByteBuf buf, OutputStream stream, boolean tryZeroCopy) throws IOException
buf
- The buffer to add.stream
- The Candidate OutputStream to add to.tryZeroCopy
- If true, try to zero-copy append the buffer to the stream. This may not succeed.IOException
- if the fast path is not enabled and there was an error copying the buffer to the stream.Copyright © 2023 The Apache Software Foundation. All rights reserved.