Skip to main content
This is the interface for a file writing stream. This interface and all its methods are implemented on the client-side.

Methods

NameDescription
CloseFinishes writing the file into memory.
OpenStarts writing the specified file into memory.
WriteWrites a portion of data into the file writer stream.

Input parameter

The ExportToMemory method of the FRDocument object receives a pointer to this interface as an input parameter.

Samples

public class FileWriter : FREngine.IFileWriter
{
 public FileWriter( string _resultsPath )
 {
  resultsPath = _resultsPath;
 }
 public void Open( string fileName, ref int bufferSize )
 {
  string resultsFilePath = resultsPath + fileName;
  stream = new FileStream( resultsFilePath, FileMode.Create );
 }
 public void Write( byte[] data )
 {
  stream.Write( data, 0, data.Length);
 }
 public void Close()
 {
  stream.Close();
 }
 private string resultsPath;
 private FileStream stream;
}

Remarks

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

See also

IReadStream