public final class EpubFormat extends FormatBase implements IDublinCore
Represents an e-book in the EPUB format. Please find more information at <a href="https://en.wikipedia.org/wiki/EPUB">https://en.wikipedia.org/wiki/EPUB</a>
.
Constructor and Description |
---|
EpubFormat(InputStream input)
Initializes a new instance of the
EpubFormat class. |
EpubFormat(String fileName)
Initializes a new instance of the
EpubFormat class. |
Modifier and Type | Method and Description |
---|---|
void |
cleanMetadata()
Removes writable metadata properties associated with the file.
|
protected void |
dispose(boolean disposing)
Releases unmanaged and optionally managed resources.
|
DublinCoreMetadata |
getDublinCore()
Retrieves the Dublin Core metadata.
|
EpubMetadata |
getEpubMetadata()
Reads metadata of the EPUB file.
|
Metadata[] |
getImageCoverMetadata()
Gets an array of metadata packages related to the image cover.
|
int |
getType()
Gets the type of the loaded file.
|
ThumbnailMetadata |
readThumbnail()
Reads the image cover.
|
close, dispose, getMetadata, getMIMEType, readByMetadataKey, save, save, save
public EpubFormat(String fileName)
Initializes a new instance of the EpubFormat
class.
fileName
- A string that contains the full name of the file from which to create an EpubFormat
instance.public EpubFormat(InputStream input)
Initializes a new instance of the EpubFormat
class.
input
- A stream that contains the data for this EpubFormat
.public int getType()
Gets the type of the loaded file.
getType
in class FormatBase
public void cleanMetadata()
Removes writable metadata properties associated with the file. This feature is not supported for this format.
cleanMetadata
in class FormatBase
public final EpubMetadata getEpubMetadata()
Reads metadata of the EPUB file.
EpubMetadata
.
public final DublinCoreMetadata getDublinCore()
Retrieves the Dublin Core metadata.
getDublinCore
in interface IDublinCore
DublinCoreMetadata
if the appropriate package is found; otherwise, null.public final ThumbnailMetadata readThumbnail()
Reads the image cover.
ThumbnailMetadata
.public final Metadata[] getImageCoverMetadata()
Gets an array of metadata packages related to the image cover.
protected void dispose(boolean disposing)
Releases unmanaged and optionally managed resources.
dispose
in class FormatBase
disposing
- true
to release both managed and unmanaged resources;
false
to release only unmanaged resources.Copyright © 2019. All rights reserved.