public final class ByteBufProcParser extends java.lang.Object implements org.vertx.java.core.Handler<io.netty.buffer.ByteBuf>, IRecordParser
Modifier and Type | Method and Description |
---|---|
void |
delimitedMode()
Flip the parser into delimited mode, and where the delimiter can be
represented by the delimiter.
|
void |
fixedSizeMode(int size)
Flip the parser into fixed size mode, where the record size is specified
by
size in bytes. |
void |
handle(org.vertx.java.core.buffer.Buffer b) |
void |
handle(io.netty.buffer.ByteBuf buffer)
This method is called to provide the parser with data.
|
static ByteBufProcParser |
newDelimited(org.vertx.java.core.net.NetSocket crapSource,
java.lang.String logPrefix,
IParsedChunksDrainer drainer)
Create a new
RecordParser instance, initially in delimited mode,
and where the delimiter can be represented by the byte[] delim. |
public static final byte CR
public static final byte LF
public static ByteBufProcParser newDelimited(org.vertx.java.core.net.NetSocket crapSource, java.lang.String logPrefix, IParsedChunksDrainer drainer)
RecordParser
instance, initially in delimited mode,
and where the delimiter can be represented by the byte[]
delim.
output
Will receive whole records which have been parsed.
public void delimitedMode()
delimitedMode
in interface IRecordParser
public void fixedSizeMode(int size)
size
in bytes.
This method can be called multiple times with different values of size while data is being parsed.
fixedSizeMode
in interface IRecordParser
public void handle(org.vertx.java.core.buffer.Buffer b)
public void handle(io.netty.buffer.ByteBuf buffer)
handle
in interface IRecordParser
handle
in interface org.vertx.java.core.Handler<io.netty.buffer.ByteBuf>
buffer
- Copyright © 2021. All Rights Reserved.