Skip to content

Latest commit

 

History

History
244 lines (136 loc) · 4.95 KB

AsfPaddingObject.md

File metadata and controls

244 lines (136 loc) · 4.95 KB

node-taglib-sharp / Exports / AsfPaddingObject

Class: AsfPaddingObject

This class provides a representation of an ASF padding object which can be read from and written to disk.

Hierarchy

Table of contents

Properties

Accessors

Methods

Properties

HEADER_LENGTH

Static Readonly HEADER_LENGTH: 24

Length of the padding object header in bytes.

Accessors

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


size

get size(): number

Gets the number of bytes the current instance will take up on disk. Note: this does not include the header for the object.

Returns

number

set size(value): void

Sets the number of padding bytes the current instance will contain. Note: this does not include the header for the object.

Parameters

Name Type Description
value number Size of the current instance in bytes, must be a safe, positive integer.

Returns

void

Methods

initializeFromFile

Protected initializeFromFile(file, position): void

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

Parameters

Name Type Description
file File File which contains the details of the new instance to create
position number Position 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

Name Type Description
guid UuidWrapper GUID 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

Name Type Description
data ByteVector Data to store in the rendered version of the current instance.

Returns

ByteVector

Inherited from

AsfBaseObject.renderInternal


fromFile

Static fromFile(file, position): AsfPaddingObject

Constructs and initializes a new instance by reading it from a file.

Parameters

Name Type Description
file File File to read the padding object from
position number Index into the file where the padding object starts from

Returns

AsfPaddingObject


fromSize

Static fromSize(size): AsfPaddingObject

Constructs and initializes a new instance with a fixed size.

Parameters

Name Type Description
size number Number of padding bytes to store in the object not including the size of the header

Returns

AsfPaddingObject