public final class EpubFormat extends FormatBase implements IDublinCore
Represents the EPUB e-booking file format. The structure of the format is ZipFormat
. See more at https://en.wikipedia.org/wiki/EPUB.
FormatBase
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 the metadata.
|
protected void |
dispose(boolean disposing)
Releases unmanaged and optionally managed resources.
|
DublinCoreMetadata |
getDublinCore()
Reads the Dublin-Core metadata from the 'metadata' element of the package.
|
EpubMetadata |
getEpubMetadata()
Reads metadata of the EPUB format.
|
Metadata[] |
getImageCoverMetadata()
Gets the array of metadata related to the image cover.
|
int |
getType()
Gets the document type.
|
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
- Absolute path to the file.public EpubFormat(InputStream input)
Initializes a new instance of the EpubFormat
class.
input
- File stream.public int getType()
Gets the document type.
getType
in class FormatBase
public void cleanMetadata()
Removes the metadata. Not supported for this format.
cleanMetadata
in class FormatBase
public final EpubMetadata getEpubMetadata()
Reads metadata of the EPUB format.
EpubMetadata
.
public final DublinCoreMetadata getDublinCore()
Reads the Dublin-Core metadata from the 'metadata' element of the package.
getDublinCore
in interface IDublinCore
DublinCoreMetadata
.
public final ThumbnailMetadata readThumbnail()
Reads the image cover.
ThumbnailMetadata
.public final Metadata[] getImageCoverMetadata()
Gets the array of metadata 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.