Skip to content

Add overload to use Sequence<String> instead of InputStream #15

@LeoColman

Description

@LeoColman

The default usage of the API is

val fileInputStream: InputStream = getFileInputStream()

fixedLengthFileParser<MyUserRecord>(fileInputStream) {
    MyUserRecord(
        field(0, 30, Padding.PaddingRight(' ')),
        field(30, 39, Padding.PaddingLeft('0')),
        field(39, 49)
    )    
}

In this case, we'll use the fileInputStream, but won't close it. When using a method such as useLines from STDLib, one can use a sequence of lines from a file. In that case, we should allow parsing/transforming that sequence instead of the stream as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions