import { ByteVector } from "../byteVector"; /** * Indicates the type of data stored in a {@link ApeTagItem} object. */ export declare enum ApeTagItemType { /** * Item contains unicode text */ Text = 0, /** * Item contains binary data */ Binary = 1, /** * Item contains a locator (file path/URL) for external information */ Locator = 2 } /** * Class that represents a property in an APE tag. */ export declare class ApeTagItem { private _data; private _isReadonly; private _key; private _size; private _text; private _type; private constructor(); /** * Constructs and initializes a new instance of {@link ApeTagItem} with a specified key and binary * data to use as the value. * @param key Key to use for the item * @param value Binary data to store as the value */ static fromBinaryValue(key: string, value: ByteVector): ApeTagItem; /** * Constructs a new instance of {@link ApeTagItem} by reading in a raw APEv2 item. * @param data {@link ByteVector} containing the item to read * @param offset Index into `data` at which to begin reading the item data. Must be * a positive 32-bit integer. */ static fromData(data: ByteVector, offset: number): ApeTagItem; /** * Constructs and initializes a new instance of {@link ApeTagItem} with a specified key and collection * of text values. * @param key Key to use for the item * @param values Values to store in the item */ static fromTextValues(key: string, ...values: string[]): ApeTagItem; /** * Gets whether the current instance is empty. */ get isEmpty(): boolean; /** * Gets whether the current instance is flagged as read-only on disk. */ get isReadOnly(): boolean; /** * Gets the key that specified the contents of the item. * @remarks * This value is used for specifying the contents of the item in a common and * consistent fashion. For example, `TITLE` specifies that the item contains the title of * the track. */ get key(): string; /** * Size of the current instance as it last appeared on disk. */ get size(): number; /** * Gets the string values stored in the current item, if the current item is a text item, or * an empty array if the current item is a binary item or no text is stored. */ get text(): string[]; /** * Gets the type of value contained in the current instance. */ get type(): ApeTagItemType; /** * Gets the binary value stored in the current item, if the current item is a binary item, or * `undefined` if the current item is a text item. */ get value(): ByteVector; /** * Creates a deep copy of the current instance. */ clone(): ApeTagItem; /** * Renders the current instance as an APEv2 item. */ render(): ByteVector; /** * Gets the contents of the current instance as a string. If the current instance is binary or * does not have a text array, `undefined` will be returned. Otherwise, the text values will be * joined into a single, comma separated list. */ toString(): string; }