Skip to content

Class TagIO

Namespace: Void.Minecraft.Nbt
Assembly: Void.Minecraft.dll

Abstract base class for the and classes, providing shared functionality.

public abstract class TagIO : IDisposable

Inheritance

objectTagIO

Derived

TagReader, TagWriter

Implements

IDisposable

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Constructors

TagIO(Stream, FormatOptions)

Initializes a new instance of the class.

protected TagIO(Stream stream, FormatOptions options)

Parameters

stream Stream

A instance that the writer will be writing to.

options FormatOptions

Bitwise flags to configure how data should be handled for compatibility between different specifications.

Exceptions

ArgumentNullException

Thrown when stream is null

Properties

BaseStream

Gets the underlying stream this instance is operating on.

protected Stream BaseStream { get; }

Property Value

Stream

FormatOptions

Gets the format to be followed for compatibility.

public FormatOptions FormatOptions { get; }

Property Value

FormatOptions

SwapEndian

Gets a flag indicating if byte swapping is required for numeric values, accounting for both the endianness of the host machine and the specified .

protected bool SwapEndian { get; }

Property Value

bool

UseVarInt

Gets a flag indicating if variable-length integers should be used in applicable places.

protected bool UseVarInt { get; }

Property Value

bool

ZigZagEncoding

Gets a flag indicating if variable-length integers will be “ZigZag encoded”.

public bool ZigZagEncoding { get; }

Property Value

bool

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public abstract void Dispose()

DisposeAsync()

Asynchronously releases the unmanaged resources used by the instance.

public abstract ValueTask DisposeAsync()

Returns

ValueTask