Home > Class Reference > %SYS namespace > %Library.FileBinaryStream

%Library.FileBinaryStream

stream class %Library.FileBinaryStream extends %Library.BinaryStream, %Library.FileStreamAdaptor

Stream class that stores binary data in external files. This class is deprecated in favor of %Stream.FileBinary. For example the following code opens a file binary stream, points it at a particular file on the filesystem and then reads it in chunks of 32,000 bytes:
  Set stream=##class(%FileBinaryStream).%New()
  Set stream.Filename="c:\myfile.txt"
  While 'stream.AtEnd {
  Set line=stream.Read()
  ; Process the chunk here
  }
  

Inherited Methods

%AddToSaveSet() %ObjectIsNull() GetStreamIdForFile()
%CheckUnique() %ObjectModified() InputFromDevice()
%ClassIsLatestVersion() %ObjectSize() IsCharacter()
%ClassName() %Oid() IsDefinedAttribute()
%ConstructClone() %Open() IsNull()
%Delete() %OpenId() LastModifiedGet()
%DeleteExtent() %OriginalNamespace() LineTerminatorSet()
%DeleteId() %PackageName() LinkToFile()
%DispatchClassMethod() %ReleaseLock() MoveTo()
%DispatchGetModified() %Reload() MoveToEnd()
%DispatchGetProperty() %RemoveFromSaveSet() NewFileName()
%DispatchMethod() %RollBack() NextAttribute()
%DispatchSetModified() %Save() OpenStream()
%DispatchSetMultidimProperty() %SerializeObject() OutputToDevice()
%DispatchSetProperty() %SetModified() OutputToDeviceAt()
%Exists() %UnlockStream() Read()
%ExistsId() %ValidateObject() ReadLine()
%Extends() CanonicalFilenameGet() ReadLineIntoStream()
%GetParameter() Clear() ReadSQL()
%GetSwizzleObject() CopyFrom() Rewind()
%Id() CopyFromAndSave() SaveStream()
%IsA() DeleteAttribute() SerializeToSyncSet()
%IsModified() DeleteStream() SetAttribute()
%IsNull() FileBinarySize() SetAttributeList()
%KillExtent() FilenameGet() SizeGet()
%LOBPrefetch() FilenameSet() StreamOIDIsNull()
%LocationGet() FindAt() SyncStreamIn()
%LocationSet() Flush() Write()
%LockStream() GetAttribute() WriteLine()
%New() GetAttributeList()
%NormalizeObject() GetStreamId()