edicl / flexi-streams

Flexible bivalent streams for Common Lisp
http://edicl.github.io/flexi-streams/
54 stars 26 forks source link

How do convert to a string or byte array? #28

Closed moon-chilled closed 6 years ago

moon-chilled commented 6 years ago

So this is probably a stupid question and this is the wrong place to ask. But I was using the clack web library for lisp, and if I POST a file with it, I get an instance of FLEXI-STREAMS::VECTOR-INPUT-STREAM (and an associated error because I'm treating it like a string). I don't know how to do anything with that and the docs aren't exactly illuminating. I could read-byte over and over again, but that seems inefficient to say the least. How can I do this?

stassats commented 6 years ago

It's a normal stream, you can read from it, with e.g. read-sequence.