NanoByte.Common  2.9.0
NanoByte.Common.Streams.OffsetStream Class Reference

Decorator that applies a constant byte offset to access to another Stream. More...

Inheritance diagram for NanoByte.Common.Streams.OffsetStream:
NanoByte.Common.Streams.DelegatingStream

Public Member Functions

 OffsetStream (Stream underlyingStream, long offset)
 Creates a new offset stream. More...
 
override long Seek (long offset, SeekOrigin origin)
 
override void SetLength (long value)
 
- Public Member Functions inherited from NanoByte.Common.Streams.DelegatingStream
override void Flush ()
 
override long Seek (long offset, SeekOrigin origin)
 
override void SetLength (long value)
 
override int Read (byte[] buffer, int offset, int count)
 
override void Write (byte[] buffer, int offset, int count)
 
override Task FlushAsync (CancellationToken cancellationToken)
 
override Task< int > ReadAsync (byte[] buffer, int offset, int count, CancellationToken cancellationToken)
 
override Task WriteAsync (byte[] buffer, int offset, int count, CancellationToken cancellationToken)
 
override int Read (Span< byte > buffer)
 
override ValueTask< int > ReadAsync (Memory< byte > buffer, CancellationToken cancellationToken=default)
 
override void Write (ReadOnlySpan< byte > buffer)
 
override ValueTask WriteAsync (ReadOnlyMemory< byte > buffer, CancellationToken cancellationToken=default)
 

Properties

override long Length [get]
 
override long Position [get, set]
 
- Properties inherited from NanoByte.Common.Streams.DelegatingStream
override bool CanRead [get]
 
override bool CanSeek [get]
 
override bool CanWrite [get]
 
override long Length [get]
 
override bool CanTimeout [get]
 
override int ReadTimeout [get]
 
override int WriteTimeout [get]
 
override long Position [get, set]
 

Additional Inherited Members

- Protected Member Functions inherited from NanoByte.Common.Streams.DelegatingStream
 DelegatingStream (Stream underlyingStream)
 Creates a new delegating stream. More...
 
override void Dispose (bool disposing)
 
- Protected Attributes inherited from NanoByte.Common.Streams.DelegatingStream
readonly Stream UnderlyingStream
 Underlying stream to delegate to. More...
 

Detailed Description

Decorator that applies a constant byte offset to access to another Stream.

Constructor & Destructor Documentation

◆ OffsetStream()

NanoByte.Common.Streams.OffsetStream.OffsetStream ( Stream  underlyingStream,
long  offset 
)
inline

Creates a new offset stream.

Parameters
underlyingStreamUnderlying stream to delegate to. Will be disposed together with this stream.
offsetNumber of bytes to offset the underlyingStream .

The documentation for this class was generated from the following file: