12.5: Chapter Summary

Pharo by Example 5.0 · LibreTexts

0%

Contents

    Text

    Size
    100%
    Theme
    Typeface
    Line length
    Spacing

    From LibreTexts, under CC BY-SA 3.0, as the source states it; its equations are written in TeX, which the PDF shows typeset. This page at LibreTexts.

    12.5: Chapter Summary

    Streams offer a better way (compared to collections) to incrementally read and write a sequence of elements. There are easy ways to convert back and forth between streams and collections.

    A 4x4 checkerboard.
    Figure \(\PageIndex{1}\): A 4x4 checkerboard you can draw using binary streams.
    • Streams may be either readable, writeable or both readable and writeable.
    • To convert a collection to a stream, define a stream on a collection, e.g., ReadStream on: (1 to: 1000), or send the messages readStream, etc. to the collection.
    • To convert a stream to a collection, send the message contents.
    • To concatenate large collections, instead of using the comma operator, it is more efficient to create a stream, append the collections to the stream with nextPutAll:, and extract the result by sending contents.
    • File streams are by default character-based. Send binary to explicitly make them binary.

    This page titled 12.5: Chapter Summary was last modified on Sat, 19 Dec 2020 08:13:39 GMT and is shared under a CC BY-SA 3.0 license and was authored, remixed, and/or curated by via source content that was edited to the style and standards of the LibreTexts platform.