Object <- PositionStream <- MemoryStream |
|
|
Close CountReadPending Open Read Write |
Class MemoryStream defines no new attributes.
Fields
| Field | Type | |
|---|---|---|
| Stream: | target: | Object |
| PositionStream: | position: | Unsigned |
| length: | Unsigned |
instance MemoryStream tag; target: nilObject; position: 0; length: 0; end instance;
Define Class MemoryStream; inherits from PositionStream; uses extra; overrides Open; // destination should be nilObject overrides Write; overrides Read; // CAUTION: if superclass reports a short read count, // should pass on to here else Position becomes inaccurate overrides Close; overrides CountReadPending; // returns the number of unread bytes in the buffer end class;