Skip to content

PooledBufferStream

class

Namespace: Orleans.Serialization.Buffers.Adaptors

A System.Buffers.IBufferWriter implementation which boxes another buffer writer.
public sealed class PooledBufferStream : Stream

Constructors

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.
  • Rent Gets an object from the pool if one is available, otherwise creates one.
  • RentReadOnlySequence Returns a new System.Buffers.ReadOnlySequence which must be used and returned before resetting this instance via the PooledBufferStream method.
  • Reset Returns all rented buffers and resets the stream to an empty state.
  • Return(PooledBufferStream) Return an object to the pool.
  • ReturnReadOnlySequence(ReadOnlySequence<byte>) Returns a System.Buffers.ReadOnlySequence previously rented by PooledBufferStream;
  • 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.
  • ToArray Returns 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.