1 USING: help.syntax help.markup io byte-arrays quotations ;
2 IN: io.streams.byte-array
4 ABOUT: "io.streams.byte-array"
6 ARTICLE: "io.streams.byte-array" "Byte-array streams"
12 "Utility combinators:"
19 { $values { "byte-array" byte-array }
20 { "encoding" "an encoding descriptor" }
21 { "stream" "a new byte reader" } }
22 { $description "Creates an input stream reading from a byte array using an encoding." } ;
25 { $values { "encoding" "an encoding descriptor" }
26 { "stream" "a new byte writer" } }
27 { $description "Creates an output stream writing data to a byte array using an encoding." } ;
29 HELP: with-byte-reader
30 { $values { "encoding" "an encoding descriptor" }
31 { "quot" quotation } { "byte-array" byte-array } }
32 { $description "Calls the quotation in a new dynamic scope with " { $link input-stream } " rebound to an input stream for reading from a byte array using an encoding." } ;
34 HELP: with-byte-writer
35 { $values { "encoding" "an encoding descriptor" }
37 { "byte-array" byte-array } }
38 { $description "Calls the quotation in a new dynamic scope with " { $link output-stream } " rebound to an output stream writing data to a byte array using an encoding." } ;