Click or drag to resize

MongoGridFSStream Class

Represents a stream interface to a GridFS file (patterned after .NET's Stream class).
Inheritance Hierarchy

Namespace:  MongoDB.Driver.GridFS
Assembly:  MongoDB.Driver.Legacy (in MongoDB.Driver.Legacy.dll) Version: 2.6.0+Branch.origin/v2.6.x.Sha.593796a7b35dc59243383bcc684de296a5468f2e
Syntax
public class MongoGridFSStream : Stream

The MongoGridFSStream type exposes the following members.

Constructors
  NameDescription
Public methodMongoGridFSStream(MongoGridFSFileInfo, FileMode)
Initializes a new instance of the MongoGridFSStream class.
Public methodMongoGridFSStream(MongoGridFSFileInfo, FileMode, FileAccess)
Initializes a new instance of the MongoGridFSStream class.
Top
Properties
  NameDescription
Public propertyCanRead
Gets whether the GridFS stream supports reading.
(Overrides StreamCanRead.)
Public propertyCanSeek
Gets whether the GridFS stream supports seeking.
(Overrides StreamCanSeek.)
Public propertyCanTimeout (Inherited from Stream.)
Public propertyCanWrite
Gets whether the GridFS stream supports writing.
(Overrides StreamCanWrite.)
Public propertyLength
Gets the current length (use SetLength to change the length).
(Overrides StreamLength.)
Public propertyPosition
Gets or sets the current position.
(Overrides StreamPosition.)
Public propertyReadTimeout (Inherited from Stream.)
Public propertyUpdateMD5 Obsolete.
Gets or sets a value indicating whether to compute and update the MD5 hash for the file when the stream is closed.
Public propertyWriteTimeout (Inherited from Stream.)
Top
Methods
  NameDescription
Public methodBeginRead (Inherited from Stream.)
Public methodBeginWrite (Inherited from Stream.)
Public methodClose (Inherited from Stream.)
Public methodCopyTo(Stream) (Inherited from Stream.)
Public methodCopyTo(Stream, Int32) (Inherited from Stream.)
Public methodCopyToAsync(Stream) (Inherited from Stream.)
Public methodCopyToAsync(Stream, Int32) (Inherited from Stream.)
Public methodCopyToAsync(Stream, Int32, CancellationToken) (Inherited from Stream.)
Public methodCreateObjRef (Inherited from MarshalByRefObject.)
Protected methodCreateWaitHandle Obsolete. (Inherited from Stream.)
Public methodDispose (Inherited from Stream.)
Protected methodDispose(Boolean)
Disposes of any resources used by the stream.
(Overrides StreamDispose(Boolean).)
Public methodEndRead (Inherited from Stream.)
Public methodEndWrite (Inherited from Stream.)
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodFlush
Flushes any unsaved data in the buffers to the GridFS file.
(Overrides StreamFlush.)
Public methodFlushAsync (Inherited from Stream.)
Public methodFlushAsync(CancellationToken) (Inherited from Stream.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetLifetimeService (Inherited from MarshalByRefObject.)
Public methodGetType (Inherited from Object.)
Public methodInitializeLifetimeService (Inherited from MarshalByRefObject.)
Protected methodMemberwiseClone (Inherited from Object.)
Protected methodMemberwiseClone(Boolean) (Inherited from MarshalByRefObject.)
Protected methodObjectInvariant Obsolete. (Inherited from Stream.)
Public methodRead
Reads bytes from the GridFS stream.
(Overrides StreamRead(Byte, Int32, Int32).)
Public methodReadAsync(Byte, Int32, Int32) (Inherited from Stream.)
Public methodReadAsync(Byte, Int32, Int32, CancellationToken) (Inherited from Stream.)
Public methodReadByte
Reads one byte from the GridFS stream.
(Overrides StreamReadByte.)
Public methodSeek
Seeks to a new position.
(Overrides StreamSeek(Int64, SeekOrigin).)
Public methodSetLength
Sets the length of the GridFS file.
(Overrides StreamSetLength(Int64).)
Public methodToString (Inherited from Object.)
Public methodWrite
Writes bytes to the GridFS stream.
(Overrides StreamWrite(Byte, Int32, Int32).)
Public methodWriteAsync(Byte, Int32, Int32) (Inherited from Stream.)
Public methodWriteAsync(Byte, Int32, Int32, CancellationToken) (Inherited from Stream.)
Public methodWriteByte
Writes one byte to the GridFS stream.
(Overrides StreamWriteByte(Byte).)
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
See Also