Show / Hide Table of Contents

Class EpubRemoteByteContentFileRef

A reference for a file located outside of the EPUB archive which allows to read its content as a byte array. Unlike EpubRemoteByteContentFile, this class contains only a reference to the file but doesn't contain its content.

Inheritance
object
EpubContentFileRef
EpubRemoteContentFileRef
EpubRemoteByteContentFileRef
Inherited Members
EpubRemoteContentFileRef.Url
EpubRemoteContentFileRef.ContentLocation
EpubRemoteContentFileRef.DownloadContentAsBytes()
EpubRemoteContentFileRef.DownloadContentAsBytesAsync()
EpubRemoteContentFileRef.DownloadContentAsText()
EpubRemoteContentFileRef.DownloadContentAsTextAsync()
EpubRemoteContentFileRef.GetDownloadingContentStream()
EpubRemoteContentFileRef.GetDownloadingContentStreamAsync()
EpubContentFileRef.Key
EpubContentFileRef.ContentType
EpubContentFileRef.ContentMimeType
EpubContentFileRef.Metadata
EpubContentFileRef.EpubContentLoader
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: VersOne.Epub
Assembly: VersOne.Epub.dll
Syntax
public class EpubRemoteByteContentFileRef : EpubRemoteContentFileRef

Constructors

View Source

EpubRemoteByteContentFileRef(EpubContentFileRefMetadata, IEpubContentLoader)

Initializes a new instance of the EpubRemoteByteContentFileRef class with a specified content file key, a content type of the file reference, a MIME type of the file's content, and content downloader options.

Declaration
public EpubRemoteByteContentFileRef(EpubContentFileRefMetadata metadata, IEpubContentLoader epubContentLoader)
Parameters
Type Name Description
EpubContentFileRefMetadata metadata

Metadata of this content file reference.

IEpubContentLoader epubContentLoader

A reference to the EPUB content loader which provides methods to download the content of this file.

Exceptions
Type Condition
ArgumentNullException

The metadata parameter is null.

ArgumentNullException

The epubContentLoader parameter is null.

Properties

View Source

ContentFileType

Gets the type of the content file which is always BYTE_ARRAY for remote byte content file references.

Declaration
public override EpubContentFileType ContentFileType { get; }
Property type: EpubContentFileType
Overrides
EpubContentFileRef.ContentFileType

Methods

View Source

DownloadContent()

Downloads the whole content of the referenced file and returns it as a byte array.

Declaration
public byte[] DownloadContent()
Returns
Type Description
byte[]

Content of the referenced file.

View Source

DownloadContentAsync()

Asynchronously downloads the whole content of the referenced file and returns it as a byte array.

Declaration
public Task<byte[]> DownloadContentAsync()
Returns
Type Description
Task<byte[]>

A task that represents the asynchronous download operation. The value of the TResult parameter contains the content of the referenced file.

  • View Source
In this article
Back to top Generated by DocFX