Home > Class Reference > ENSLIB namespace > %IO.MetaCharacterStream


class %IO.MetaCharacterStream extends %IO.I.CharacterSeekableStream, %IO.IParts.MetaIO

Provides a %IO seekable stream wrapper for one or more %IO streams, %Library streams or %Stream streams. It can use different streams for input/Read and output/Write, and it can write a copy of input stream data to one or more additional output streams.


Parameters Properties Methods Queries Indices ForeignKeys Triggers


AtEnd CharEncoding DefaultFlushOnWrite ExternalBytePosition
ExternalByteSize IsCharacter IsOpen LineTerminator
Name Position Size StreamIn
StreamsCopyInput StreamsOutput WriteToStreamIn
%AddToSaveSet %ClassIsLatestVersion %ClassName %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IsA %IsModified %New
%NormalizeObject %ObjectModified %OnNew %OriginalNamespace
%PackageName %RemoveFromSaveSet %SerializeObject %SetModified
%ValidateObject AtEndGet BindCopyInput BindCopyInputArray
BindInput BindOutput BindOutputArray CharEncodingSet
Clear Close CopyFrom CopyReplace
CopyReplaceArray DefaultFlushOnWriteGet ExternalByteSeek ExternalByteSizeGet
ExternalByteTruncateAt Find Flush FlushCopyInput
InputFromDevice IsCharacterGet IsOpenGet LineTerminatorSet
OutputToDevice PositionGet Read ReadLine
ReadUntil ReadUntilArray Reset Rewind
Seek SizeGet TruncateAt Write


method %OnNew(pBaseStream As %IO.I.Stream = "") as %Status
This callback method is invoked by the %New method to provide notification that a new instance of an object is being created.

If this method returns an error then the object will not be created.

It is passed the arguments provided in the %New call. When customizing this method, override the arguments with whatever variables and types you expect to receive from %New(). For example, if you're going to call %New, passing 2 arguments, %OnNew's signature could be:

Method %OnNew(dob as %Date = "", name as %Name = "") as %Status If instead of returning a %Status code this returns an oref and this oref is a subclass of the current class then this oref will be the one returned to the caller of %New method.

method AtEndGet() as %Boolean
This is a Get accessor method for the AtEnd property.
method BindInput(pInputStream As %IO.I.Stream, Output pSC As %Status)
method IsOpenGet() as %Boolean
This is a Get accessor method for the IsOpen property.
method LineTerminatorSet(pTerm As %String) as %Status
This is a Set accessor method for the LineTerminator property.
method PositionGet() as %Integer
This is a Get accessor method for the Position property.
method ReadLine(pMaxReadLen As %Integer, ByRef pTimeout As %Numeric = -1, Output pSC As %Status, ByRef pLineTerminator As %String = ..LineTerminator) as %String
Read until pMaxReadLen chars are gotten, pTimeout expires, or a LineTerminator character is found. On return, if pTimeout=0 it means no timeout occurred. If pTimeout=0 and the returned string contains the full pMaxReadLen characters, it means no LineTerminator was encountered yet, even if the following character would be a LineTerminator. If pTimeout=0 and the returned string is shorter than pMaxReadLen, then either a LineTerminator or the End Of Stream (AtEnd = 1) was encountered. If pLineTerminator is defined, then the line is read until one of the given characters is encountered. On return, pLineTerminator contains the encountered character(s) if any.
method Seek(pPosition As %Integer, Output pSC As %Status) as %Boolean
method SizeGet() as %Integer
This is a Get accessor method for the Size property.