Метод | Описание | |
---|---|---|
Resource ( System stream, string href ) : System |
Creates a resource with the data from the given InputStream at the specified href. The MediaType will be determined based on the href extension.
|
|
Resource ( byte data, |
Creates a Resource with the given data and MediaType. The href will be automatically generated. Assumes that if the data is of a text type (html/css/etc) then the encoding will be UTF-8
|
|
Resource ( byte data, string href ) : System |
Creates a resource with the given data at the specified href. The MediaType will be determined based on the href extension. Assumes that if the data is of a text type (html/css/etc) then the encoding will be UTF-8
|
|
Resource ( string href ) : System |
Creates an empty Resource with the given href. Assumes that if the data is of a text type (html/css/etc) then the encoding will be UTF-8
|
|
Resource ( string id, byte data, string href, |
Creates a resource with the given id, data, mediatype at the specified href. Assumes that if the data is of a text type (html/css/etc) then the encoding will be UTF-8
|
|
Resource ( string id, byte data, string href, |
Creates a resource with the given id, data, mediatype at the specified href. If the data is of a text type (html/css/etc) then it will use the given inputEncoding.
|
|
Resource ( string fileName, long size, string href ) : System |
Creates a Lazy resource, by not actually loading the data for this entry. The data will be loaded on the first call to getData()
|
|
close ( ) : void |
Tells this resource to release its cached data. If this resource was not lazy- loaded, this is a no-op.
|
|
equals ( Object resourceObject ) : bool |
Checks to see of the given resourceObject is a resource and whether its href is equal to this one.
|
|
getData ( ) : byte[] |
The contents of the resource as a byte[] If this resource was lazy-loaded and the data was not yet loaded, it will be loaded into memory at this point. This included opening the zip file, so expect a first load to be slow.
|
|
getHref ( ) : string |
The location of the resource within the contents folder of the epub file. Example:
|
|
getId ( ) : string |
The resources Id. Must be both unique within all the resources of this book and a valid identifier.
|
|
getInputEncoding ( ) : string |
The character encoding of the resource. Is allowed to be null for non-text resources like images.
|
|
getInputStream ( ) : |
Gets the contents of the Resource as an InputStream.
|
|
getMediaType ( ) : |
This resource's mediaType.
|
|
getSize ( ) : long |
Returns the size of this resource in bytes.
|
|
getTitle ( ) : string |
If the title is found by scanning the underlying html document then it is cached here.
|
|
hashCode ( ) : int |
Gets the hashCode of the Resource's href.
|
|
isInitialized ( ) : bool |
Returns if the data for this resource has been loaded into memory.
|
|
setData ( byte data ) : void |
Sets the data of the Resource. If the data is a of a different type then the original data then make sure to change the MediaType.
|
|
setHref ( string href ) : void |
Sets the Resource's href.
|
|
setId ( string id ) : void |
Sets the Resource's id: Make sure it is unique and a valid identifier.
|
|
setInputEncoding ( string encoding ) : void |
Sets the Resource's input character encoding.
|
|
setMediaType ( |
||
setTitle ( string title ) : void | ||
toString ( ) : string |
public Resource ( System stream, string href ) : System | ||
stream | System | |
href | string | The location of the resource within the epub. Example: /// "cover.jpg". |
Результат | System |
public Resource ( byte data, |
||
data | byte | The Resource's contents |
mediaType | The MediaType of the Resource | |
Результат | System |
public Resource ( byte data, string href ) : System | ||
data | byte | The Resource's contents |
href | string | The location of the resource within the epub. Example: /// "chapter1.html". |
Результат | System |
public Resource ( string href ) : System | ||
href | string | The location of the resource within the epub. Example: /// "chapter1.html". |
Результат | System |
public Resource ( string id, byte data, string href, |
||
id | string | The id of the Resource. Internal use only. Will be auto- /// generated if it has a null-value. |
data | byte | The Resource's contents |
href | string | The location of the resource within the epub. Example: /// "chapter1.html". |
mediaType | The resources MediaType | |
Результат | System |
public Resource ( string id, byte data, string href, |
||
id | string | The id of the Resource. Internal use only. Will be auto- /// generated if it has a null-value. |
data | byte | The Resource's contents |
href | string | The location of the resource within the epub. Example: /// "chapter1.html". |
mediaType | The resources MediaType | |
inputEncoding | string | If the data is of a text type (html/css/etc) then /// it will use the given inputEncoding. |
Результат | System |
public Resource ( string fileName, long size, string href ) : System | ||
fileName | string | the fileName for the epub we're created from. |
size | long | the size of this resource. |
href | string | The resource's href within the epub. |
Результат | System |
public equals ( Object resourceObject ) : bool | ||
resourceObject | Object | |
Результат | bool |
public setInputEncoding ( string encoding ) : void | ||
encoding | string | encoding |
Результат | void |
public setMediaType ( |
||
mediaType | ||
Результат | void |