IDocumentInfo

public interface IDocumentInfo

Common interface for all file metadata wrappers

Methods

Method Description
getPageCount() In implementing type should return count (number) of pages or other similar format-dependent entities (tabs, slides etc.).
getSize() Document size in bytes
isEncrypted() Indicates whether specific file is encrypted and requires password for opening.
getFormat() Returns a document format

getPageCount()

public abstract int getPageCount()

In implementing type should return count (number) of pages or other similar format-dependent entities (tabs, slides etc.). For those family types, that don’t have something similar (like plain text documents or XML) should return 1.

Returns: int -

getSize()

public abstract long getSize()

Document size in bytes

Returns: long -

isEncrypted()

public abstract boolean isEncrypted()

Indicates whether specific file is encrypted and requires password for opening. For the document types, that cannot be encrypted (like all text-based) should always return ‘false’.

Returns: boolean -

getFormat()

public abstract DocumentFormatBase getFormat()

Returns a document format

Returns: DocumentFormatBase -