Skip to content

Class BufferRemainingDataException

Namespace: Void.Minecraft.Buffers.Exceptions
Assembly: Void.Minecraft.dll

Represents an error that occurs when a buffer operation completes with unread bytes remaining.

public class BufferRemainingDataException : Exception, ISerializable

Inheritance

objectExceptionBufferRemainingDataException

Implements

ISerializable

Inherited Members

Exception.GetBaseException(), Exception.GetType(), Exception.ToString(), Exception.Data, Exception.HelpLink, Exception.HResult, Exception.InnerException, Exception.Message, Exception.Source, Exception.StackTrace, Exception.TargetSite, Exception.SerializeObjectState, object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Remarks

This exception is thrown by when the span is disposed before all bytes are consumed.

Constructors

BufferRemainingDataException(long, long)

Represents an error that occurs when a buffer operation completes with unread bytes remaining.

public BufferRemainingDataException(long bufferSize, long bufferPosition)

Parameters

bufferSize long

The total length of the buffer that was being consumed.

bufferPosition long

The final read position reached when the operation ended.

Remarks

This exception is thrown by when the span is disposed before all bytes are consumed.

Properties

BufferPosition

Gets the read position at the time the exception was created.

public long BufferPosition { get; }

Property Value

long

BufferSize

Gets the total size of the buffer.

public long BufferSize { get; }

Property Value

long

RemainingData

Gets the number of unread bytes remaining in the buffer.

public long RemainingData { get; }

Property Value

long