SKFrontBufferedStream Class

Definition

A read-only stream that buffers the specified first chunk of bytes.

public class SKFrontBufferedStream : System.IO.Stream
Inheritance
SKFrontBufferedStream

Remarks

This is useful for decoding images using streams that are not seekable, since SKCodec needs to read the first few bytes to determine the codec to use.

Constructors

SKFrontBufferedStream(Stream)

Creates a new instance of SKFrontBufferedStream that wraps the specified stream.

SKFrontBufferedStream(Stream, Boolean)

Creates a new instance of SKFrontBufferedStream that wraps the specified stream.

SKFrontBufferedStream(Stream, Int64)

Creates a new instance of SKFrontBufferedStream that wraps the specified stream.

SKFrontBufferedStream(Stream, Int64, Boolean)

Creates a new instance of SKFrontBufferedStream that wraps the specified stream.

Fields

DefaultBufferSize

The default number of bytes to buffer (4096 bytes).

Properties

CanRead

Gets a value indicating whether the current stream supports reading.

CanSeek

Gets a value indicating whether the current stream supports seeking.

CanWrite

Gets a value indicating whether the current stream supports writing.

Length

Gets the stream length in bytes.

Position

Gets the position within the current stream.

Methods

Dispose(Boolean)

Releases the unmanaged resources used by the SKFrontBufferedStream and optionally releases the managed resources.

Flush()

Clears all buffers for this stream and causes any buffered data to be written to the underlying device.

Read(Byte[], Int32, Int32)

Copies bytes from the current buffered stream to an array.

Seek(Int64, SeekOrigin)

Sets the position within the current buffered stream.

SetLength(Int64)

Sets the length of the buffered stream.

Write(Byte[], Int32, Int32)

Copies bytes to the buffered stream and advances the current position within the buffered stream by the number of bytes written.

Applies to