public class DataBuffer extends Object
| Constructor and Description |
|---|
DataBuffer() |
DataBuffer(byte[] buffer) |
DataBuffer(byte[] buffer,
int offset,
int length) |
DataBuffer(io.netty.buffer.ByteBuf buf)
Creates a DataBuffer and adds the ByteBuf to this DataBuffer
|
DataBuffer(int nrArrays) |
| Modifier and Type | Method and Description |
|---|---|
DataBuffer |
add(DataBuffer dataBuffer) |
int |
alreadyTransferred() |
List<ByteBuffer> |
bufferList()
Always make a copy with shallowCopy before using the buffer directly.
|
byte[] |
bytes() |
boolean |
equals(Object obj) |
protected void |
finalize() |
int |
hashCode() |
int |
length() |
void |
resetAlreadyTransferred() |
DataBuffer |
shallowCopy() |
io.netty.buffer.ByteBuf |
toByteBuf() |
ByteBuffer[] |
toByteBuffer() |
io.netty.buffer.ByteBuf[] |
toByteBufs() |
int |
transferFrom(io.netty.buffer.ByteBuf buf,
int remaining) |
void |
transferTo(AlternativeCompositeByteBuf buf)
Transfers the data from this buffer the CompositeByteBuf.
|
public DataBuffer()
public DataBuffer(int nrArrays)
public DataBuffer(byte[] buffer)
public DataBuffer(byte[] buffer,
int offset,
int length)
public DataBuffer(io.netty.buffer.ByteBuf buf)
buf - The ByteBuf to addpublic DataBuffer add(DataBuffer dataBuffer)
public DataBuffer shallowCopy()
public List<ByteBuffer> bufferList()
public int length()
public io.netty.buffer.ByteBuf toByteBuf()
public io.netty.buffer.ByteBuf[] toByteBufs()
public ByteBuffer[] toByteBuffer()
public void transferTo(AlternativeCompositeByteBuf buf)
buf - The CompositeByteBuf, where the data from this buffer is
transfered topublic int transferFrom(io.netty.buffer.ByteBuf buf,
int remaining)
public int alreadyTransferred()
public void resetAlreadyTransferred()
protected void finalize()
throws Throwable
public byte[] bytes()
Copyright © 2014. All rights reserved.