Skip to main content

EnsLib.RecordMap.Service.FileServiceStream

For InterSystems internal use only, subject to change without notice.

Specializes class MetaCharacterStream to buffer reads without ever calling upon the underlying stream's ReadLine() method.

Class RecordMap parses a file by mixing calls to both ReadLine() and Read(), which streams in the IO package seem to implement by switching the buffering mode of the underlying device, first closing and then reopening it again in the new mode - with implications for performance.

This class reimplements the relevant methods by buffering the data itself in a string property, filling the buffer as needed by calling Read() only.

Method Inventory

Parameters

final parameter max;
The number of characters to read into the buffer

Methods

method AtEndGet() as %Boolean
Override to account for any unread buffered characters.
method PositionGet() as %Integer
Override to account for any unread buffered characters.
method Read(sz As %Integer, ByRef to As %Numeric = -1, Output sc As %Status) as %String
Override to read from our internal buffer 'buf'.
method ReadLine(ignore As %Integer, ByRef to As %Numeric = -1, Output sc As %Status, ByRef eol As %String = ..LineTerminator) as %String
Override to read from our internal buffer 'buf'.

Inherited Members

Inherited Properties

Inherited Methods

FeedbackOpens in a new tab