vertx / io.vertx.core.parsetools / RecordParser / newDelimited

newDelimited

open static fun newDelimited(delim: String, output: Handler<Buffer>): RecordParser

Like #newDelimited(String) but set the output that will receive whole records which have been parsed.

Parameters

delim - the initial delimiter string

output - handler that will receive the output

open static fun newDelimited(delim: String, stream: ReadStream<Buffer>): RecordParser

Like #newDelimited(String) but wraps the stream. The stream handlers will be set/unset when the #handler(Handler) is set. The pause()/resume() operations are propagated to the stream.

Parameters

delim - the initial delimiter string

stream - the wrapped stream

open static fun newDelimited(delim: String): RecordParser

Create a new RecordParser instance, initially in delimited mode, and where the delimiter can be represented by the String delim endcoded in latin-1 . Don't use this if your String contains other than latin-1 characters.

output Will receive whole records which have been parsed.

Parameters

delim - the initial delimiter string

open static fun newDelimited(delim: Buffer): RecordParser

Create a new RecordParser instance, initially in delimited mode, and where the delimiter can be represented by the Buffer delim.

Parameters

delim - the initial delimiter buffer

open static fun newDelimited(delim: Buffer, output: Handler<Buffer>): RecordParser

Like #newDelimited(Buffer) but set the output that will receive whole records which have been parsed.

Parameters

delim - the initial delimiter buffer

output - handler that will receive the output

open static fun newDelimited(delim: Buffer, stream: ReadStream<Buffer>): RecordParser

Like #newDelimited(Buffer) but wraps the stream. The stream handlers will be set/unset when the #handler(Handler) is set. The pause()/resume() operations are propagated to the stream.

Parameters

delim - the initial delimiter buffer

stream - the wrapped stream