Inherited Attributes
Attributes inherited from: Object
hash, string
Methods
newDelimitedshared RecordParser newDelimited(Buffer delim)

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

newDelimitedshared RecordParser newDelimited(String delim)

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

newDelimitedshared RecordParser newDelimited(Buffer delim, Anything(Buffer) output)

Like newDelimited 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

newDelimitedshared RecordParser newDelimited(Buffer delim, ReadStream<Buffer> stream)

Like newDelimited but wraps the stream. The stream handlers will be set/unset when the handler is set.

The pause()/resume() operations are propagated to the stream.

Parameters:
  • delim

    the initial delimiter buffer

  • stream

    the wrapped stream

newDelimitedshared RecordParser newDelimited(String delim, Anything(Buffer) output)

Like newDelimited 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

newDelimitedshared RecordParser newDelimited(String delim, ReadStream<Buffer> stream)

Like newDelimited but wraps the stream. The stream handlers will be set/unset when the handler is set.

The pause()/resume() operations are propagated to the stream.

Parameters:
  • delim

    the initial delimiter string

  • stream

    the wrapped stream

newFixedshared RecordParser newFixed(Integer size)

Create a new RecordParser instance, initially in fixed size mode, and where the record size is specified by the size parameter.

output Will receive whole records which have been parsed.

Parameters:
  • size

    the initial record size

newFixedshared RecordParser newFixed(Integer size, Anything(Buffer) output)

Like newFixed but set the output that will receive whole records which have been parsed.

Parameters:
  • size

    the initial record size

  • output

    handler that will receive the output

newFixedshared RecordParser newFixed(Integer size, ReadStream<Buffer> stream)

Like newFixed but wraps the stream. The stream handlers will be set/unset when the handler is set.

The pause()/resume() operations are propagated to the stream.

Parameters:
  • size

    the initial record size

  • stream

    the wrapped stream

Inherited Methods
Methods inherited from: Object
equals