Object <- MemoryPipe |
|
|
DoFlushWriter DoOpenWriter DoSeekReader DoSeekWriter |
Class MemoryPipe defines no new attributes.
Fields
| Field | Type | |
|---|---|---|
| Stream: | target: | Object |
| Reader: | readerBuffer: | Buffer |
| start: | Unsigned | |
| lowPosition: | Unsigned | |
| highPosition: | Unsigned | |
| currentPosition: | Unsigned | |
| closed: | Boolean | |
| seekable: | Boolean | |
| intermittent: | Boolean | |
| Writer: | buffer: | Buffer |
| start: | Unsigned | |
| low: | Unsigned | |
| high: | Unsigned | |
| current: | Unsigned | |
| closed: | Boolean | |
| seekable: | Boolean | |
| unbuffered: | Boolean | |
| MemoryPipe: | readBytes: | Unsigned |
| unwrittenBytes: | Unsigned | |
| flipped: | Boolean |
instance MemoryPipe tag; target: nilObject; readerBuffer: nilObject; start: 0; lowPosition: 0; highPosition: 0; currentPosition: 0; closed: false; seekable: false; intermittent: false; buffer: nilObject; start: 0; low: 0; high: 0; current: 0; closed: false; seekable: false; unbuffered: false; readBytes: 0; unwrittenBytes: 0; flipped: false; end instance;
Define Class MemoryPipe; inherits from Object, Stream, Reader, Writer; uses extra; field readBytes: Unsigned; // The logical first page in the stream has this many read bytes at the start. field unwrittenBytes: Unsigned; // The logical last page in the stream has this many unwritten bytes at the end. field flipped: Boolean; // If false, the first logical page is at the start of the extra data. // If true, the first logical page is at the end of the extra data. overrides DoOpenWriter; // Resets extra size to zero, sets flipped to false. overrides DoSeekWriter, DoFlushWriter; // Empties the buffer into the logical end of the extra data. overrides DoSeekReader; // Fills the buffer with bytes from the start of what was written. // Also flips the buffer for faster read performance. end class;