public final class EpubFormat extends FormatBase implements IDublinCore
Represents EPUB e-booking file format. The structure of the format is ZipFormat
. See more: https://en.wikipedia.org/wiki/EPUB.
FormatBase
filePath, stream
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 metadata.
|
DublinCoreMetadata |
getDublinCore()
Reads Dublin-Core metadata from 'metadata' element of package.
|
EpubMetadata |
getEpubMetadata()
Reads metadata of EPUB format.
|
Metadata[] |
getImageCoverMetadata()
Gets the array of metadata related to the image cover.
|
int |
getType()
Gets 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 document type.
getType
in class FormatBase
public void cleanMetadata()
Removes metadata. Not supported for this format.
cleanMetadata
in class FormatBase
public final EpubMetadata getEpubMetadata()
Reads metadata of EPUB format. It does not contain Dublin Core metadata. To read DC see GetDublinCore
.
EpubMetadata
.
public final DublinCoreMetadata getDublinCore()
Reads Dublin-Core metadata from 'metadata' element of 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.
Copyright © 2018. All rights reserved.