Home > Class Reference > ENSLIB namespace > %Library.AbstractStream

%Library.AbstractStream

abstract stream class %Library.AbstractStream extends %Stream.Object

Deprecated class, the base stream class is %Stream.Object. This is kept for legacy reasons.

A stream represents an arbitrary array of characters (or bytes) and a current position. The basic stream interface provides the ability to read data from a stream, write data to the stream, and rewind the current position to the beginning of the stream.

Within Caché streams are used to create large (greater than 32K) object attributes.

Property Inventory (Including Private)

Method Inventory (Including Private)

Parameters

parameter MAXLEN = 2147483647;
The maximum number of characters (or bytes) allowed in a stream.
parameter MAXLOCALSIZE = 32000;
parameter PROPERTYVALIDATION = 0;
Turns off property validation.
final parameter READCHANGED = 2;
final parameter READNODATA = 0;
final parameter READNOTCHANGED = 1;
final parameter WRITE = 3;

Properties (Including Private)

property Attributes as %String [ MultiDimensional ];
An array of strings containing any attribute values associated with this stream.
Property methods: AttributesDisplayToLogical(), AttributesGet(), AttributesIsValid(), AttributesLogicalToDisplay(), AttributesLogicalToOdbc(), AttributesNormalize(), AttributesSet()
property LineTerminator as %String (MAXLEN = 10) [ InitialExpression = $char(13,10) ];
Type of line terminator we use for this stream, defaults to Cr/Lf. Maximum length is 10 characters. This is stored as an attribute of the stream called 'LineTerminator'.
Property methods: LineTerminatorDisplayToLogical(), LineTerminatorGet(), LineTerminatorIsValid(), LineTerminatorLogicalToDisplay(), LineTerminatorLogicalToOdbc(), LineTerminatorNormalize(), LineTerminatorSet()
property Mode as %Integer [ Private , InitialExpression = 0 ];
Property methods: ModeDisplayToLogical(), ModeGet(), ModeIsValid(), ModeLogicalToDisplay(), ModeNormalize(), ModeSet()

Methods (Including Private)

private classmethod %DeleteData(soid As %String, concurrency As %Integer) as %Status
private method %GetSerial(force As %Integer = 0) as %String
method %Id() as %String
Returns the persistent object Id, if there is one, of this object.

Returns a null string if there is no object Id.

method %IsModified() as %Integer
Inherited description: Returns true (1) if a property of this instance has been modified, otherwise false (0). A TRUE result does not necessarily mean that any property has actually been changed. If %IsModified() returns false then the object has not been modified. There are some situations where we simply cannot efficiently detect a change in value. In these cases we will set the modified status of the property.
method %IsNull() as %Boolean
Returns true if this is a "NULL" stream; that is, a stream which has never been written to and saved. This is used by the Caché ODBC server.
private method %Load(sid As %String) as %Status
private method %LoadData(serialized As %String) as %Status
method %ObjectModified() as %Integer
Inherited description: This method is somewhat similar to %IsModified but it also checks to see if swizzled references would cause the object to become modified should they be serialized. This works on the assumption that a reference to a persistent object will never be modified if the ID has already been assigned. For references to serial objects, a call to %ObjectModified indicates whether or not the serialized value is different. If the reference to a swizzled object is different from the initial object state then the $$$objModAll macro will already return true. Reference the Set code. Returns true (1) if this instance has been modified, otherwise false (0).
private method %OnClose() as %Status
Inherited description: This callback method is invoked by the %Close() method to provide notification that the current object is being closed.

The return value of this method is ignored.

private method %OnNew(initval As %String = "") as %Status