1

I want to force BeanIO to use CRLF as terminator when exporting a fixed-length stream. The following does not work

<stream name="marketFeed" format="fixedlength">
        <parser>
            <property name="recordTerminator" value="CRLF" />
        </parser>

I want to be tolerant for line-endings on parse, but want to use CRLF on export. This is in fact an I/O stream format.

Is this possible?

usr-local-ΕΨΗΕΛΩΝ
  • 26,101
  • 30
  • 154
  • 305

1 Answers1

1

Have you tried:

<stream name="marketFeed" format="fixedlength">
    <parser>
        <property name="recordTerminator" value="\r\n" />
    </parser>

OR if it has to be escaped:

<stream name="marketFeed" format="fixedlength">
    <parser>
        <property name="recordTerminator" value="\\r\\n" />
    </parser>

CR usually implies \r and LF = \n. I haven't tested this though.

[OP comment]: no need to escape

usr-local-ΕΨΗΕΛΩΝ
  • 26,101
  • 30
  • 154
  • 305
nicoschl
  • 2,346
  • 1
  • 17
  • 17