PooledBufferStream
class
Namespace: Orleans.Serialization.Buffers.Adaptors
A
System.Buffers.IBufferWriter implementation which boxes another buffer writer. public sealed class PooledBufferStream : StreamConstructors
PooledBufferStreamInitializes a new instance of thePooledBufferStreamclass.PooledBufferStream(int)Initializes a new instance of thePooledBufferStreamclass.
Properties
CanReadWhen overridden in a derived class, gets a value indicating whether the current stream supports reading.CanSeekWhen overridden in a derived class, gets a value indicating whether the current stream supports seeking.CanWriteWhen overridden in a derived class, gets a value indicating whether the current stream supports writing.LengthGets the total length which has been written.PositionWhen overridden in a derived class, gets or sets the position within the current stream.
Methods
CopyTo(Writer<TBufferWriter>)Copies the contents of this writer to another writer.FlushWhen overridden in a derived class, clears all buffers for this stream and causes any buffered data to be written to the underlying device.Read(byte[], int, int)When overridden in a derived class, reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.RentGets an object from the pool if one is available, otherwise creates one.RentReadOnlySequenceReturns a newSystem.Buffers.ReadOnlySequencewhich must be used and returned before resetting this instance via thePooledBufferStreammethod.ResetReturn(PooledBufferStream)Return an object to the pool.ReturnReadOnlySequence(ReadOnlySequence<byte>)Returns aSystem.Buffers.ReadOnlySequencepreviously rented byPooledBufferStream;Seek(long, SeekOrigin)When overridden in a derived class, sets the position within the current stream.SetLength(long)When overridden in a derived class, sets the length of the current stream.ToArrayReturns the data which has been written as an array.Write(byte[], int, int)When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.
