Deprecated class, the base stream class is <class>Stream.Object</class>. More...
Public Member Functions | |
_.Library.Status | OnClose () |
This callback method is invoked by the <METHOD>Close</METHOD> method to. More... | |
_.Library.Status | CopyFrom (_.Stream.Object source) |
Copies the contents of source into this Stream. More... | |
_.Library.Boolean | DeleteAttribute (_.Library.String name) |
Removes this attribute variable from the collection. More... | |
_.Library.Status | Flush () |
Flush any output in the stream not already saved. | |
_.Library.String | GetAttribute (_.Library.String name, _.Library.String default) |
Retrieves the named attribute value. | |
_.Library.String | GetStreamId () |
Returns an full id value (including class name) with which the Stream implementation has stored. More... | |
_.Library.Boolean | IsDefinedAttribute (_.Library.String name) |
Returns true if the named attribute variable exists in the collection, false otherwise. | |
_.Library.Boolean | IsNull () |
Returns true if this is a "NULL" stream; that is, a stream which has never. More... | |
_.Library.Status | MoveToEnd () |
Move to the end of the stream so the next <METHDO>Write</METHOD> will be appended to the end. More... | |
_.Library.String | NextAttribute (_.Library.String name) |
Retrieves the next attribute variable name in the sequence, skip any '' names. | |
_.Library.AbstractStream | ReadLineIntoStream () |
This reads from the stream until it find the <property>LineTerminator</property> and returns. More... | |
_.Library.Status | Rewind () |
Go back to the start of the stream. | |
_.Library.Status | SaveStream () |
Deprecated method, use <method>Save</method> instead. More... | |
SetAttribute (_.Library.String name, _.Library.String value) | |
Inserts an attribute variable by name into the collection. | |
_.Library.Status | WriteLine (_.Library.RawString data) |
Appends the string data along with a line terminator to the stream and advances the. More... | |
![]() | |
_.Library.Status | AcquireLock (locktype) |
Acquires a lock for the current instance. More... | |
_.Library.Status | OnAfterSave (_.Library.Boolean insert) |
This callback method is invoked by the <METHOD>Save</METHOD> method to. More... | |
_.Library.Status | OnBeforeSave (_.Library.Boolean insert) |
This callback method is invoked by the <METHOD>Save</METHOD> method to. More... | |
_.Library.Status | OnOpen () |
This callback method is invoked by the <METHOD>Open</METHOD> method to. More... | |
_.Library.Status | OnReload () |
This callback method is invoked by the <METHOD>Reload</METHOD> method to. More... | |
_.Library.Status | OnRollBack () |
This callback method is invoked by the <METHOD>Save</METHOD> method to. More... | |
_.Library.Status | Clear () |
Clear the contents of this Stream from permanent storage. More... | |
_.Library.Status | CopyFrom (_.Stream.Object source) |
Copies the contents of source into this Stream. More... | |
_.Library.Status | CopyFromAndSave (_.Stream.Object source) |
Copy the stream from source into the current stream ignoring anything already in the current stream. More... | |
_.Library.Integer | FindAt (_.Library.Integer position, _.Library.RawString target, _.Library.RawString tmpstr, _.Library.Boolean caseinsensitive) |
Find the first occurrence of target in the stream, starting the search at position. More... | |
_.Library.Status | InputFromDevice (_.Library.Integer len, _.Library.Integer timeout) |
Input len characters from the current device into the stream. More... | |
_.Library.Boolean | MoveTo (_.Library.Integer position) |
Move to this position in the stream. More... | |
_.Library.Status | OutputToDevice (_.Library.Integer len) |
Write out len characters of the stream to the current device starting from the current position. More... | |
_.Library.Status | OutputToDeviceAt (_.Library.Integer position, _.Library.Integer length) |
Output the stream to the current device starting at position of length. More... | |
_.Library.RawString | Read (_.Library.Integer len, _.Library.Status sc) |
Reads up to len characters from the current position. More... | |
_.Library.RawString | ReadLine (_.Library.Integer len, _.Library.Status sc, _.Library.Boolean eol) |
Read a line from the stream. More... | |
_.Library.String | ReadSQL (_.Library.Integer start, _.Library.Integer end) |
SQL specific method for reading stream data. | |
_.Library.Status | SerializeToSyncSet (_.SYNC.SyncSet ss, _.Library.Integer iPtr, _.Library.String property) |
SerializeToSyncSet copies the stream value from the current object to the sync set global. More... | |
_.Library.Status | SyncStreamIn (_.SYNC.SyncSet ss, _.Library.Integer iPtr, _.Library.String property) |
SyncStreamIn copies the stream value from the sync set global into the current object. | |
_.Library.Status | Write (_.Library.RawString data) |
Appends the string data to the stream and advances the. More... | |
_.Library.Status | WriteLine (_.Library.RawString data) |
Appends the string data along with a line terminator to the stream and advances the. More... | |
![]() | |
_.Library.Status | OnAddToSaveSet (_.Library.Integer depth, _.Library.Integer insert, _.Library.Integer callcount) |
This callback method is invoked when the current object is added to the SaveSet,. More... | |
_.Library.Status | OnConstructClone (_.Library.RegisteredObject object, _.Library.Boolean deep, _.Library.String cloned) |
This callback method is invoked by the <METHOD>ConstructClone</METHOD> method to. More... | |
_.Library.Status | OnNew () |
This callback method is invoked by the <METHOD>New</METHOD> method to. More... | |
_.Library.Status | OnValidateObject () |
This callback method is invoked by the <METHOD>ValidateObject</METHOD> method to. More... | |
Static Public Member Functions | |
_.Library.Status | DeleteStream (_.Library.ObjectIdentity oid, _.Library.Integer concurrency) |
Deprecated method, use <method>Delete</method> instead. More... | |
![]() | |
_.Library.String | GetLockReference (_.Library.String pLocation, _.Library.String pId) |
Returns the global reference used to lock the current stream object. More... | |
_.Library.Status | OnDelete (_.Library.ObjectIdentity oid) |
This callback method is invoked by the <METHOD>Delete</METHOD> method to. More... | |
_.Library.String | IsCharacter () |
Return true if this is a character stream and false if it is a binary stream. | |
_.Library.Boolean | StreamOIDIsNull (_.Library.ObjectIdentity soid) |
Return true if this stream oid is a null stream and false if the stream is not null. | |
Public Attributes | |
Attributes | |
An array of strings containing any attribute values associated with this stream. More... | |
LineTerminator | |
Type of line terminator we use for this stream, defaults to Cr/Lf. More... | |
![]() | |
AtEnd | |
The AtEnd property is set to true (1) when, during a read,. More... | |
LastModified | |
LastModified is a read-only property containing the <class>TimeStamp</class> of More... | |
Size | |
Size is a read-only property containing the current size of the stream (in bytes More... | |
Static Public Attributes | |
MAXLEN = None | |
The maximum number of characters (or bytes) allowed in a stream. | |
PROPERTYVALIDATION = None | |
Turns off property validation. | |
![]() | |
DEFAULTCONCURRENCY = None | |
![]() | |
CAPTION = None | |
Optional name used by the Form Wizard for a class when generating forms. More... | |
JAVATYPE = None | |
The Java type to be used when exported. | |
PROPERTYVALIDATION = None | |
This parameter controls the default validation behavior for the object. More... | |
Private Member Functions | |
_.Library.String | Id () |
Returns the persistent object Id, if there is one, of this object. More... | |
_.Library.Integer | IsModified () |
Returns true (1) if a property of this instance has been modified, otherwise false (0). More... | |
_.Library.Boolean | IsNull () |
Returns true if this is a "NULL" stream; that is, a stream which has never. More... | |
_.Library.Integer | ObjectModified () |
This method is somewhat similar to IsModified but it also checks to see if swizzled. More... | |
_.Library.Integer | __IOGetSize () |
Return the current size of the data stream. | |
_.Library.String | __IOGetStreamId () |
Return the id for a stream; that is, an identifier that can later be used. More... | |
__IOInit () | |
Initialize member variable used by the StreamAdaptor. More... | |
_.Library.Status | __IOMoveToEnd () |
Move to the end of the stream and set ourselves to #WRITE mode so the. More... | |
_.Library.Status | __IOOnClose () |
Perform any clean up required by the StreamAdaptor. More... | |
_.Library.Status | __IOOnNew (_.Library.String initval) |
Perform any initialization required by the StreamAdaptor. More... | |
_.Library.Status | __IOOpenStream (_.Library.String sid) |
Open the stream identified by sid. | |
_.Library.String | __IOReadData (_.Library.Integer len, _.Library.Status sc) |
Reads up to len characters from the current position. More... | |
_.Library.Status | __IOSaveStream () |
Write the stream to storage. | |
_.Library.Status | __IOWriteData (_.Library.String data) |
Writes data to the stream at the current location. | |
Static Private Member Functions | |
_.Library.Status | __IODeleteStream (_.Library.String sid, _.Library.Integer concurrency) |
Delete the storage for the stream identified by sid. | |
Private Attributes | |
__Mode | |
More... | |
Deprecated class, the base stream class is <class>Stream.Object</class>.
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 InterSystems IRIS streams are used to create large (greater than 32K) object attributes.
|
private |
Returns the persistent object Id, if there is one, of this object.
Returns a null string if there is no object Id.
Reimplemented from Object.
|
private |
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.
Reimplemented from RegisteredObject.
Reimplemented in Routine.
|
private |
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 InterSystems IRIS ODBC server.
Reimplemented from Object.
Reimplemented in NullCharacter, and NullBinary.
|
private |
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 <property>Set code.
Returns true (1) if this instance has been modified, otherwise false (0).
Reimplemented from RegisteredObject.
Reimplemented in Routine.
_.Library.Status OnClose | ( | ) |
This callback method is invoked by the <METHOD>Close</METHOD> method to.
provide notification that the current object is being closed.
The return value of this method is ignored.
Reimplemented from Object.
Reimplemented in Routine, GlobalStreamAdaptor, FileStreamAdaptor, and File.
_.Library.Status CopyFrom | ( | _.Stream.Object | source | ) |
Copies the contents of source into this Stream.
For example, you can copy oldstream into a new stream:
Set newstream=##class(GlobalCharacterStream).New() Do newstream.CopyFrom(oldstream)
Returns a <CLASS>Status</CLASS> value indicating success or failure.
_.Library.Boolean DeleteAttribute | ( | _.Library.String | name | ) |
Removes this attribute variable from the collection.
Returns true is it existed and false if it
did not exist.
|
static |
Deprecated method, use <method>Delete</method> instead.
Deletes the stored stream identified by oid. This will not remove the stream attributes of any saved streams, it will just remove the stream data. If you need to clear the attributes as well you will have to call <METHOD>Clear</METHOD> on the stream object.
_.Library.String GetStreamId | ( | ) |
|
private |
Return the id for a stream; that is, an identifier that can later be used.
to open the same stream.
Reimplemented in Routine, GlobalStreamAdaptor, and FileStreamAdaptor.
|
private |
Initialize member variable used by the StreamAdaptor.
This
This is called when the containing stream is opened via SetSerial.
Reimplemented in Routine, GlobalStreamAdaptor, and FileStreamAdaptor.
|
private |
Move to the end of the stream and set ourselves to #WRITE mode so the.
next <METHOD>IOWriteData</METHOD> will append data to the stream.
|
private |
Perform any clean up required by the StreamAdaptor.
This is called by the containing stream's OnClose method.
|
private |
Perform any initialization required by the StreamAdaptor.
This is called by the containing stream's OnNew method.
|
private |
Reads up to len characters from the current position.
in the stream. The current position is advanced by the number of characers read. Upon exit, len is set to the actual number of characters read. If a read occurs when the stream position is at the end of the stream, len will be set to 0 and <METHOD>IOReadData</METHOD> will return a null string ("").
Returns a string up to len characters long.
_.Library.Boolean IsNull | ( | ) |
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 InterSystems IRIS ODBC server.
Reimplemented from Object.
Reimplemented in NullCharacter, and NullBinary.
_.Library.Status MoveToEnd | ( | ) |
Move to the end of the stream so the next <METHDO>Write</METHOD> will be appended to the end.
This allows you to read from a stream, then MoveToEnd() and append new data, where just calling <METHOD>Write</METHOD> after a read will clear the stream before writing new data.
Returns a <CLASS>Status</CLASS> value indicating success or failure.
Reimplemented from Object.
Reimplemented in AbstractDocument, NullCharacter, NullBinary, Routine, GlobalStreamAdaptor, FileStreamAdaptor, and LibraryStream.
_.Library.AbstractStream ReadLineIntoStream | ( | ) |
This reads from the stream until it find the <property>LineTerminator</property> and returns.
this as a stream. If the stream does not contain the line terminator this can potentially be the entire stream.
Reimplemented in GlobalStreamAdaptor.
_.Library.Status SaveStream | ( | ) |
Deprecated method, use <method>Save</method> instead.
Saves the temporary copy of the stream data to a persistent location. Note that any locking or transaction handling must be done by the caller.
Returns a <CLASS>Status</CLASS> value indicating success or failure.
Reimplemented in NullCharacter, NullBinary, GlobalStreamAdaptor, and FileStreamAdaptor.
_.Library.Status WriteLine | ( | _.Library.RawString | data | ) |
Appends the string data along with a line terminator to the stream and advances the.
current stream position by the number of characters in data plus the line terminator.
Returns a <CLASS>Status</CLASS> value indicating success or failure.
Reimplemented in File.
Attributes |
An array of strings containing any attribute values associated with this stream.
LineTerminator |
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'.
|
private |