OpcFileStream Class

Namespace: Opc.UaFx.Client
Assemblies: Opc.UaFx.Advanced.dll

Provides a Stream for a file node.

C#

public class OpcFileStream : Stream, IDisposable


Inheritance ObjectMarshalByRefObjectStream › OpcFileStream


Implements IDisposable

Name Description
OpcFileStream(OpcClient, OpcNodeId, OpcFileMode) Initializes a new instance of the OpcFileStream class using the specified client, fileNodeId and mode.
OpcFileStream(OpcFileInfo, OpcFileMode) Initializes a new instance of the OpcFileStream class using the specified file and mode.
OpcFileStream(OpcFileNodeContext, OpcFileMode) Initializes a new instance of the OpcFileStream class using the specified context and mode.
Name Description
CanRead Gets a value indicating whether the current stream supports reading.
CanSeek Gets a value indicating whether the current stream supports seeking.
CanWrite Gets a value indicating whether the current stream supports writing.
File Gets the OpcFileInfo used to determine the file accessibility and its size.
Handle Gets a SafeOpcFileHandle object that represents the file handle for the file that the current OpcFileStream object encapsulates.
Length Gets the length in bytes of the stream.
Position Gets or sets the position within the current stream.
Name Description
Close Closes the current stream and releases any resources associated with the current stream. Instead of calling this method, ensure that the stream is properly disposed.
Flush Clears all buffers for this stream and causes any buffered data to be written to the underlying device.
Read(Byte, Int32, Int32) Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.
Seek(Int64, SeekOrigin) Sets the position within the current stream.
SetLength(Int64) Sets the length of the current stream.
Write(Byte, Int32, Int32) Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.