SegmentArrayMessageReader reader(builder.getSegmentsForOutput()) should work