node-taglib-sharp / Exports / AsfPaddingObject
This class provides a representation of an ASF padding object which can be read from and written to disk.
-
↳
AsfPaddingObject
▪ Static Readonly HEADER_LENGTH: 24
Length of the padding object header in bytes.
• get guid(): UuidWrapper
Gets the GUID that identifies the current instance.
BaseObject.guid
• get objectType(): AsfObjectType
Gets the type of the object for easy comparison.
BaseObject.objectType
• get originalSize(): number
Gets the original size of the current instance.
number
BaseObject.originalSize
• 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.
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.
| Name | Type | Description |
|---|---|---|
value |
number |
Size of the current instance in bytes, must be a safe, positive integer. |
void
▸ Protected initializeFromFile(file, position): void
Initializes a new instance by reading the contents from a specified position in a specified file.
| 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 |
void
AsfBaseObject.initializeFromFile
▸ Protected initializeFromGuid(guid): void
Initializes a new instance with a specified GUID.
| Name | Type | Description |
|---|---|---|
guid |
UuidWrapper |
GUID to use for the new instance. |
void
AsfBaseObject.initializeFromGuid
▸ render(): ByteVector
Renders the current instance as a raw ASF object.
▸ 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.
| Name | Type | Description |
|---|---|---|
data |
ByteVector |
Data to store in the rendered version of the current instance. |
▸ Static fromFile(file, position): AsfPaddingObject
Constructs and initializes a new instance by reading it from a file.
| Name | Type | Description |
|---|---|---|
file |
File |
File to read the padding object from |
position |
number |
Index into the file where the padding object starts from |
▸ Static fromSize(size): AsfPaddingObject
Constructs and initializes a new instance with a fixed size.
| Name | Type | Description |
|---|---|---|
size |
number |
Number of padding bytes to store in the object not including the size of the header |