public final class IovArray extends Object implements io.netty.channel.ChannelOutboundBuffer.MessageProcessor
man writev.
struct iovec {
void *iov_base;
size_t iov_len;
};
See also
Efficient JNI programming IV: Wrapping native data objects.| Constructor and Description |
|---|
IovArray() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(io.netty.buffer.ByteBuf buf)
Try to add the given
ByteBuf. |
boolean |
add(io.netty.buffer.CompositeByteBuf buf)
Try to add the given
CompositeByteBuf. |
void |
clear() |
int |
count()
Returns the number if iov entries.
|
long |
memoryAddress(int offset)
Returns the
memoryAddress for the given offset. |
boolean |
processMessage(Object msg) |
long |
processWritten(int index,
long written)
Process the written iov entries.
|
void |
release()
Release the
IovArray. |
long |
size()
Returns the size in bytes
|
public void clear()
public boolean add(io.netty.buffer.ByteBuf buf)
ByteBuf. Returns true on success,
false otherwise.public boolean add(io.netty.buffer.CompositeByteBuf buf)
CompositeByteBuf. Returns true on success,
false otherwise.public long processWritten(int index,
long written)
written value. Otherwise it returns -1.public int count()
public long size()
public long memoryAddress(int offset)
memoryAddress for the given offset.public void release()
IovArray. Once release further using of it may crash the JVM!Copyright © 2008–2017 The Netty Project. All rights reserved.