Use FLEXI-STREAMS:WITH-INPUT-FROM-SEQUENCE and FLEXI-STREAMS:WITH-OUTPUT-TO-SEQUENCE where appropriate.