Click or drag to resize
GridFSUploadStream Class
Represents a Stream used by the application to write data to a GridFS file.
Inheritance Hierarchy
System.IO.Stream
      MongoDB.Driver.GridFS.DelegatingStream
        MongoDB.Driver.GridFS.GridFSUploadStream

Namespace: MongoDB.Driver.GridFS
Assembly: MongoDB.Driver.GridFS (in MongoDB.Driver.GridFS.dll) Version: 2.4.1
Syntax
public class GridFSUploadStream : DelegatingStream

The GridFSUploadStream type exposes the following members.

Methods
  NameDescription
Public methodAbort
Aborts an upload operation.
Public methodAbortAsync
Aborts an upload operation.
Public methodBeginRead (Inherited from DelegatingStream.)
Public methodClose()
Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream. Instead of calling this method, ensure that the stream is properly disposed.
(Inherited from DelegatingStream.)
Public methodClose(CancellationToken)
Closes the Stream and completes the upload operation.
Public methodCloseAsync
Closes the Stream and completes the upload operation.
Public methodWaitHandle object. (Inherited from DelegatingStream.)
Public methodFlushAsync()
Asynchronously clears all buffers for this stream and causes any buffered data to be written to the underlying device.
(Inherited from Object.)
Protected methodStream.)
Public methodWriteAsync(Byte[], Int32, Int32, CancellationToken)
Asynchronously writes a sequence of bytes to the current stream, advances the current position within this stream by the number of bytes written, and monitors cancellation requests.
(Inherited from DelegatingStream.)
Public methodWriteByte
Writes a byte to the current position in the stream and advances the position within the stream by one byte.
(Inherited from DelegatingStream.)
Top
Extension Methods
  NameDescription
Public Extension MethodToBson
Serializes an object to a BSON byte array.
(Defined by BsonExtensionMethods.)
Public Extension MethodToBsonDocument
Serializes an object to a BsonDocument.
(Defined by BsonExtensionMethods.)
Public Extension MethodToJson
Serializes an object to a JSON string.
(Defined by BsonExtensionMethods.)
Top
Properties
  NameDescription
Public propertyCanRead
When overridden in a derived class, gets a value indicating whether the current stream supports reading.
(Inherited from DelegatingStream.)
Public propertyCanSeek
When overridden in a derived class, gets a value indicating whether the current stream supports seeking.
(Inherited from DelegatingStream.)
Public propertyCanTimeout
Gets a value that determines whether the current stream can time out.
(Inherited from DelegatingStream.)
Public propertyCanWrite
When overridden in a derived class, gets a value indicating whether the current stream supports writing.
(Inherited from DelegatingStream.)
Public propertyId
Gets the id of the file being added to GridFS.
Public propertyLength
When overridden in a derived class, gets the length in bytes of the stream.
(Inherited from DelegatingStream.)
Public propertyPosition
When overridden in a derived class, gets or sets the position within the current stream.
(Inherited from DelegatingStream.)
Public propertyReadTimeout
Gets or sets a value, in miliseconds, that determines how long the stream will attempt to read before timing out.
(Inherited from DelegatingStream.)
Public propertyWriteTimeout
Gets or sets a value, in miliseconds, that determines how long the stream will attempt to write before timing out.
(Inherited from DelegatingStream.)
Top
See Also

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant