Table of Contents

Class StreamedByteArrayAttribute

Namespace
Vintagestory.API.Datastructures
Assembly
VintagestoryAPI.dll

When serialized, produces identical byte output to a ByteArrayAttribute. The difference is, for performance, this writes directly to the provided BinaryWriter stream
Intended to be deserialized to a ByteArrayAttribute

public class StreamedByteArrayAttribute : ArrayAttribute<byte>, IAttribute
Inheritance
StreamedByteArrayAttribute
Implements
Inherited Members
Extension Methods

Constructors

StreamedByteArrayAttribute()

public StreamedByteArrayAttribute()

StreamedByteArrayAttribute(FastMemoryStream)

public StreamedByteArrayAttribute(FastMemoryStream ms)

Parameters

ms FastMemoryStream

Methods

BeginDirectWrite(BinaryWriter, string)

public void BeginDirectWrite(BinaryWriter stream, string key)

Parameters

stream BinaryWriter
key string

Clone()

public IAttribute Clone()

Returns

IAttribute

FromBytes(BinaryReader)

public void FromBytes(BinaryReader stream)

Parameters

stream BinaryReader

GetAttributeId()

public int GetAttributeId()

Returns

int

ToBytes(BinaryWriter)

public void ToBytes(BinaryWriter stream)

Parameters

stream BinaryWriter