public class BufferStateManager extends Object
Modifier and Type | Class and Description |
---|---|
static class |
BufferStateManager.Direction |
Modifier and Type | Field and Description |
---|---|
private ByteBuffer |
buffer |
private BufferStateManager.Direction |
direction |
private static org.slf4j.Logger |
logger |
Constructor and Description |
---|
BufferStateManager(ByteBuffer buffer) |
BufferStateManager(ByteBuffer buffer,
BufferStateManager.Direction direction) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the contents of the buffer and sets direction to WRITE
|
void |
compact() |
void |
ensureSize(int requiredSize)
Ensures that the buffer is at least as big as the size specified, resizing the buffer if necessary.
|
ByteBuffer |
prepareForRead(int requiredSize) |
ByteBuffer |
prepareForWrite(int requiredSize) |
private static final org.slf4j.Logger logger
private ByteBuffer buffer
private BufferStateManager.Direction direction
public BufferStateManager(ByteBuffer buffer)
public BufferStateManager(ByteBuffer buffer, BufferStateManager.Direction direction)
public void ensureSize(int requiredSize)
requiredSize
- the desired size of the bufferpublic ByteBuffer prepareForWrite(int requiredSize)
public ByteBuffer prepareForRead(int requiredSize)
public void clear()
public void compact()
Copyright © 2015 Apache NiFi Project. All rights reserved.