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.
The default usage of the API is
In this case, we'll use the fileInputStream, but won't close it. When using a method such as
useLinesfrom 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.