public class BufferWriteBuffer extends Object implements WriteBuffer
Constructor and Description |
---|
BufferWriteBuffer(ByteBuffer buffer)
Initiate.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getData()
Obtains the data to write.
|
ByteBuffer |
getDataBuffer()
Obtains the buffered data to write.
|
WriteBufferEnum |
getType()
Obtains the type of this
WriteBuffer . |
int |
length()
Obtains the number of bytes in the data to write.
|
public BufferWriteBuffer(ByteBuffer buffer)
buffer
- ByteBuffer
to write.public WriteBufferEnum getType()
WriteBuffer
WriteBuffer
.getType
in interface WriteBuffer
WriteBuffer
.public byte[] getData()
WriteBuffer
getData
in interface WriteBuffer
null
if containing data in
ByteBuffer
.public int length()
WriteBuffer
length
in interface WriteBuffer
-1
if
providing data through ByteBuffer
.public ByteBuffer getDataBuffer()
WriteBuffer
Obtains the buffered data to write.
This allows the ConnectionHandler
to cache content in direct
ByteBuffer
instances to write to the client.
getDataBuffer
in interface WriteBuffer
ByteBuffer
containing data to write.Copyright © 2005–2016. All rights reserved.