]> gitweb.factorcode.org Git - factor.git/blob - basis/io/streams/byte-array/byte-array-docs.factor
7b276213437770bee91e8a05612f67a2997efb53
[factor.git] / basis / io / streams / byte-array / byte-array-docs.factor
1 USING: help.syntax help.markup io byte-arrays quotations ;
2 IN: io.streams.byte-array
3
4 ABOUT: "io.streams.byte-array"
5
6 ARTICLE: "io.streams.byte-array" "Byte-array streams"
7 "Byte array streams:"
8 { $subsection <byte-reader> }
9 { $subsection <byte-writer> }
10 "Utility combinators:"
11 { $subsection with-byte-reader }
12 { $subsection with-byte-writer } ;
13
14 HELP: <byte-reader>
15 { $values { "byte-array" byte-array }
16     { "encoding" "an encoding descriptor" }
17     { "stream" "a new byte reader" } }
18 { $description "Creates an input stream reading from a byte array using an encoding." } ;
19
20 HELP: <byte-writer>
21 { $values { "encoding" "an encoding descriptor" }
22     { "stream" "a new byte writer" } }
23 { $description "Creates an output stream writing data to a byte array using an encoding." } ;
24
25 HELP: with-byte-reader
26 { $values { "encoding" "an encoding descriptor" }
27     { "quot" quotation } { "byte-array" byte-array } }
28 { $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." } ;
29
30 HELP: with-byte-writer
31 { $values  { "encoding" "an encoding descriptor" }
32     { "quot" quotation }
33     { "byte-array" byte-array } }
34 { $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." } ;