import CombinedTag from "../combinedTag"; import { ByteVector } from "../byteVector"; import { File, ReadStyle } from "../file"; import { Tag, TagTypes } from "../tag"; /** * Provides support for accessing and modifying a collection of tags appearing at the start of a * file. * This class is used by {@link SandwichFile} to read all the tags appearing at the start of the * file but could be used by other classes. It currently supports ID3v2 and APE tags. */ export default class StartTag extends CombinedTag { /** * List of tag types that are supported by a sandwich tag's start tag. */ static readonly SUPPORTED_TAG_TYPES: TagTypes; /** * Constructs and initializes a new instance by reading tags from the beginning of the * specified file until non-tag content is found. * @param file File on which the new instance will perform its operations * @param readStyle How deeply to read the tag and its properties */ constructor(file: File, readStyle: ReadStyle); /** @inheritDoc */ createTag(type: TagTypes, copy: boolean): Tag; /** * Renders the tags contained in the current instance. * The tags are rendered in the order that they are stored in the current instance. * @returns Physical representation of the tags stored in the current instance */ render(): ByteVector; /** * Reads the tags stored at the start of the file into the current instance. */ private read; }