C# Class MongoDB.Driver.GridFS.MongoGridFSStream

Inheritance: Stream
Mostrar archivo Open project: CloudMetal/mongo-csharp-driver

Private Properties

Property Type Description
AddMissingChunks void
LoadChunk void
LoadChunkNoData void
OpenAppend void
OpenCreate void
OpenExisting void
OpenTruncate void
SaveChunk void
UpdateMetadata void

Public Methods

Method Description
Flush ( ) : void

Flushes any unsaved data in the buffers to the GridFS file.

MongoGridFSStream ( MongoDB.Driver.GridFS.MongoGridFSFileInfo fileInfo, FileMode mode ) : System

Initializes a new instance of the MongoGridFSStream class.

MongoGridFSStream ( MongoDB.Driver.GridFS.MongoGridFSFileInfo fileInfo, FileMode mode, FileAccess access ) : System

Initializes a new instance of the MongoGridFSStream class.

Read ( byte buffer, int offset, int count ) : int

Reads bytes from the GridFS stream.

ReadByte ( ) : int

Reads one byte from the GridFS stream.

Seek ( long offset, SeekOrigin origin ) : long

Seeks to a new position.

SetLength ( long value ) : void

Sets the length of the GridFS file.

Write ( byte buffer, int offset, int count ) : void

Writes bytes to the GridFS stream.

WriteByte ( byte value ) : void

Writes one byte to the GridFS stream.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Disposes of any resources used by the stream.

Private Methods

Method Description
AddMissingChunks ( ) : void
LoadChunk ( long chunkIndex ) : void
LoadChunkNoData ( long chunkIndex ) : void
OpenAppend ( ) : void
OpenCreate ( ) : void
OpenExisting ( ) : void
OpenTruncate ( ) : void
SaveChunk ( ) : void
UpdateMetadata ( ) : void

Method Details

Dispose() protected method

Disposes of any resources used by the stream.
protected Dispose ( bool disposing ) : void
disposing bool True if called from Dispose.
return void

Flush() public method

Flushes any unsaved data in the buffers to the GridFS file.
public Flush ( ) : void
return void

MongoGridFSStream() public method

Initializes a new instance of the MongoGridFSStream class.
public MongoGridFSStream ( MongoDB.Driver.GridFS.MongoGridFSFileInfo fileInfo, FileMode mode ) : System
fileInfo MongoDB.Driver.GridFS.MongoGridFSFileInfo The GridFS file info.
mode FileMode The mode.
return System

MongoGridFSStream() public method

Initializes a new instance of the MongoGridFSStream class.
public MongoGridFSStream ( MongoDB.Driver.GridFS.MongoGridFSFileInfo fileInfo, FileMode mode, FileAccess access ) : System
fileInfo MongoDB.Driver.GridFS.MongoGridFSFileInfo The GridFS file info.
mode FileMode The mode.
access FileAccess The acess.
return System

Read() public method

Reads bytes from the GridFS stream.
public Read ( byte buffer, int offset, int count ) : int
buffer byte The destination buffer.
offset int The offset in the destination buffer at which to place the read bytes.
count int The number of bytes to read.
return int

ReadByte() public method

Reads one byte from the GridFS stream.
public ReadByte ( ) : int
return int

Seek() public method

Seeks to a new position.
public Seek ( long offset, SeekOrigin origin ) : long
offset long The seek offset.
origin SeekOrigin The seek origin.
return long

SetLength() public method

Sets the length of the GridFS file.
public SetLength ( long value ) : void
value long The length.
return void

Write() public method

Writes bytes to the GridFS stream.
public Write ( byte buffer, int offset, int count ) : void
buffer byte The source buffer.
offset int The offset in the source buffer to the bytes.
count int The number of bytes to write.
return void

WriteByte() public method

Writes one byte to the GridFS stream.
public WriteByte ( byte value ) : void
value byte The byte.
return void