public class RELPDecoder extends Object
| Modifier and Type | Field and Description |
|---|---|
private Charset |
charset |
private ByteArrayOutputStream |
currBytes |
private RELPState |
currState |
private RELPFrame.Builder |
frameBuilder |
(package private) static org.slf4j.Logger |
logger |
| Constructor and Description |
|---|
RELPDecoder(Charset charset) |
RELPDecoder(Charset charset,
ByteArrayOutputStream buffer) |
RELPDecoder(Charset charset,
int bufferSize) |
| Modifier and Type | Method and Description |
|---|---|
RELPFrame |
getFrame()
Returns the decoded frame and resets the decoder for the next frame.
|
boolean |
process(byte currByte)
Process the next byte from the channel, updating the builder and state accordingly.
|
private void |
processCOMMAND(byte b) |
private void |
processDATA(byte b) |
private void |
processLENGTH(byte b) |
private void |
processTRAILER(byte b) |
private void |
processTXNR(byte b) |
void |
reset()
Resets this decoder back to it's initial state.
|
static final org.slf4j.Logger logger
private RELPFrame.Builder frameBuilder
private RELPState currState
private final Charset charset
private final ByteArrayOutputStream currBytes
public RELPDecoder(Charset charset)
charset - the charset to decode bytes from the RELP framepublic RELPDecoder(Charset charset, int bufferSize)
charset - the charset to decode bytes from the RELP framepublic RELPDecoder(Charset charset, ByteArrayOutputStream buffer)
charset - the charset to decode bytes from the RELP framebuffer - a buffer to use while processing the bytespublic void reset()
public boolean process(byte currByte)
throws RELPFrameException
currByte - the next byte to processRELPFrameExceptionpublic RELPFrame getFrame() throws RELPFrameException
RELPFrameExceptionprivate void processTXNR(byte b)
private void processCOMMAND(byte b)
private void processLENGTH(byte b)
private void processDATA(byte b)
private void processTRAILER(byte b)
Copyright © 2023 Apache NiFi Project. All rights reserved.