I need to create fixed length records which consist mostly of space but which are sparsely populated at certain known positons. Essentially what I need to produce is a legacy file format in which the records consist of a large number of fixed length fields. I only need to populate a handful of these fields so I want to create the empty buffer full of spaces first, and write formatted fields of specifc length at specific positions
Share
Try this: