Edit

Share via


PooledBufferStream Class

Definition

A IBufferWriter<T> implementation which boxes another buffer writer.

public sealed class PooledBufferStream : System.IO.Stream
type PooledBufferStream = class
    inherit Stream
Public NotInheritable Class PooledBufferStream
Inherits Stream
Inheritance
PooledBufferStream

Constructors

PooledBufferStream()

Initializes a new instance of the PooledBufferStream class.

PooledBufferStream(Int32)

Initializes a new instance of the PooledBufferStream class.

Properties

CanRead
CanSeek
CanWrite
Length

Gets the total length which has been written.

Position

Methods

CopyTo<TBufferWriter>(Writer<TBufferWriter>)

Copies the contents of this writer to another writer.

Flush()
Read(Byte[], Int32, Int32)
Rent()

Gets an object from the pool if one is available, otherwise creates one.

RentReadOnlySequence()

Returns a new ReadOnlySequence<T> which must be used and returned before resetting this instance via the ReturnReadOnlySequence(ReadOnlySequence<Byte>) method.

Reset()
Return(PooledBufferStream)

Return an object to the pool.

ReturnReadOnlySequence(ReadOnlySequence<Byte>)

Returns a ReadOnlySequence<T> previously rented by RentReadOnlySequence();

Seek(Int64, SeekOrigin)
SetLength(Int64)
ToArray()

Returns the data which has been written as an array.

Write(Byte[], Int32, Int32)

Applies to