import BaseObject from "./baseObject"; import { ByteVector } from "../../byteVector"; import { ObjectType } from "../constants"; import { File } from "../../file"; /** * This class extends {@link BaseObject} to provide a representation of an ASF header extension * object which can be read from and written to disk. */ export default class HeaderExtensionObject extends BaseObject { private _children; private constructor(); /** * Constructs and initialized a new instance by reading the contents from a specified position * in the provided file. * @param file File containing contents that will be read into the new instance * @param position Position in the file where the instance begins */ static fromFile(file: File, position: number): HeaderExtensionObject; /** * Gets the child ASF objects contained in the current instance. * @remarks * The returned array is a copy of the array of children inside this object. Any * changes to this array will not be reflected in the object. * * Only certain objects are valid inside a header extension object. Any objects that are * not valid or not supported are read as {@link UnknownObject}. */ get children(): BaseObject[]; /** @inheritDoc */ get objectType(): ObjectType; /** * Adds a unique child object to the current instance, replacing an existing child if present. * @param obj Object to add to the current instance */ addUniqueObject(obj: BaseObject): void; /** @inheritDoc */ render(): ByteVector; private static readObject; }