using System; using VersOne.Epub.Schema; namespace VersOne.Epub { /// /// A file within the EPUB archive with its content represented as a byte array. It is used for images and font files. /// Unlike , this class contains the whole content of the file. /// public class EpubLocalByteContentFile : EpubLocalContentFile { /// /// Initializes a new instance of the class. /// /// The content file key as it is declared in the EPUB manifest (in the property). /// The type of the content of the file. /// The MIME type of the content of the file. /// The absolute path of the local content file in the EPUB archive. /// The content of the file. /// The parameter is null. /// The parameter is null. /// The parameter is null. public EpubLocalByteContentFile(string key, EpubContentType contentType, string contentMimeType, string filePath, byte[] content) : base(key, contentType, contentMimeType, filePath) { Content = content ?? throw new ArgumentNullException(nameof(content)); } /// /// Gets the content of the file. /// public byte[] Content { get; } /// /// Gets the type of the content file which is always for local byte content files. /// public override EpubContentFileType ContentFileType => EpubContentFileType.BYTE_ARRAY; } }