Class: AsfUnknownObject

March 10, 2023 · View on GitHub

node-taglib-sharp / Exports / AsfUnknownObject

Class: AsfUnknownObject

This class provides a representation of an ASF object that is unknown to the library, which can be read from and written to disk.

Hierarchy

Table of contents

Accessors

Methods

Accessors

data

get data(): ByteVector

Gets the data contained in the current instance.

Returns

ByteVector

set data(value): void

Sets the data contained in the current instance.

Parameters

NameTypeDescription
valueByteVectorData to store in the current instance. Must be truthy.

Returns

void


guid

get guid(): UuidWrapper

Gets the GUID that identifies the current instance.

Returns

UuidWrapper

Inherited from

BaseObject.guid


objectType

get objectType(): AsfObjectType

Gets the type of the object for easy comparison.

Returns

AsfObjectType

Overrides

BaseObject.objectType


originalSize

get originalSize(): number

Gets the original size of the current instance.

Returns

number

Inherited from

BaseObject.originalSize

Methods

initializeFromFile

Protected initializeFromFile(file, position): void

Initializes a new instance by reading the contents from a specified position in a specified file.

Parameters

NameTypeDescription
fileFileFile which contains the details of the new instance to create
positionnumberPosition in file where the object begins

Returns

void

Inherited from

AsfBaseObject.initializeFromFile


initializeFromGuid

Protected initializeFromGuid(guid): void

Initializes a new instance with a specified GUID.

Parameters

NameTypeDescription
guidUuidWrapperGUID to use for the new instance.

Returns

void

Inherited from

AsfBaseObject.initializeFromGuid


render

render(): ByteVector

Renders the current instance as a raw ASF object.

Returns

ByteVector

Overrides

AsfBaseObject.render


renderInternal

Protected renderInternal(data): ByteVector

Renders the current instance as a raw ASF object containing the specified data.

Remarks

Child classes implementing () should render their contents and then send the data through this method to produce the final output.

Parameters

NameTypeDescription
dataByteVectorData to store in the rendered version of the current instance.

Returns

ByteVector

Inherited from

AsfBaseObject.renderInternal


fromFile

Static fromFile(file, position): AsfUnknownObject

Constructs and initializes a new instance by reading the contents from a specified file.

Parameters

NameTypeDescription
fileFileFile from which the contents of the new instance will be read
positionnumberIndex into the file where the object begins

Returns

AsfUnknownObject