Skip to main content
This is the interface for a read stream. This interface and all its methods are implemented on the client-side. A read stream may be implemented, for example, as reading from file.

Methods

NameDescription
CloseFinishes using the stream. All allocated resources can be released.
ReadReads the specified number of bytes from the stream.

Input parameter

This object is passed as an input parameter to the following methods:

Samples

class ReadStream : IReadStream
{
 private MemoryStream fileBytes = null;
 public ReadStream( byte[] _fileBytes )
 {
  fileBytes = new MemoryStream( _fileBytes );
 }
 public void Close()
 {
  fileBytes.Close();
 }
 public int Read( out byte[] data, int count )
 {
  data = new byte[count];
  int readBytes = fileBytes.Read( data, 0, count );
  return readBytes;
 }
}

Remarks

In Linux, this interface does not work if the Engine object is loaded as an out-of-process server.

See also

FRDocument IWriteStream IFileWriter