SqlClientInputStream Class
Inherits: Stream
Exposes a write-only, forward-only stream around an image column in a record in a SQL Server database. This stream is unbuffered.
Members
Overridden. Gets a value indicating whether the current stream supports reading.
Overridden. Gets a value indicating whether the current stream supports seeking.
Overridden. Gets a value indicating whether the current stream supports writing.
Close()
Overridden. Closes the file and releases any resources associated with the current file stream.
Flush()
Overridden. Clears all buffers for this stream and causes any buffered data to be written to the underlying device.
Overridden. Gets the length in bytes of the stream.
Position – Int64
Overridden. Gets or sets the current position of this stream.
Overridden. Reads a block of bytes from the stream and writes the data in a given buffer.
Parameters
- buffer (Byte[])
– When this method returns, contains the specified byte array with the values between offset and (offset + count - 1) replaced by the bytes read from the current source.
- offset (Int32)
– The byte offset in buffer at which to begin reading.
- count (Int32)
– The maximum number of bytes to read.
Return Value
Int32 – The total number of bytes read into the buffer. This might be less than the number of bytes requested if that number of bytes are not currently available, or zero if the end of the stream is reached.
Overridden. Sets the current position of this stream to the given value.
Parameters
- offset (Int64)
– The point relative to origin from which to begin seeking.
- origin (SeekOrigin)
– Specifies the beginning, the end, or the current position as a reference point for origin, using a value of type SeekOrigin.
Return Value
Int64 – The new position in the stream.
SetLength(Int64)
Overridden. Sets the length of this stream to the given value.
Parameters
- value (Int64)
– The new length of the stream.
Creates a new instance of the SqlClientInputStream class for the specified connection string, table data field, and where criteria.
Parameters
- connectionString (String)
– The connection string of the database to use.
- table (String)
– The table in which the data is stored.
- dataField (String)
– The field in which the data is stored
- whereCriteria (String)
– The where criteria that identifies the record.
Overridden. Writes a block of bytes to this stream using data from a buffer.
Parameters
- buffer (Byte[])
– The array to which bytes are written.
- start (Int32)
– The byte offset in buffer at which to begin writing.
- count (Int32)
– The maximum number of bytes to write.
|