Class FilesetBookCreator
java.lang.Object
nl.siegmann.epublib.fileset.FilesetBookCreator
Creates a Book from a collection of html and image files.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final BookProcessorprivate static Comparator<org.apache.commons.vfs2.FileObject> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BookcreateBookFromDirectory(File rootDirectory) static BookcreateBookFromDirectory(File rootDirectory, String encoding) static BookcreateBookFromDirectory(org.apache.commons.vfs2.FileObject rootDirectory) static BookcreateBookFromDirectory(org.apache.commons.vfs2.FileObject rootDirectory, String encoding) Recursively adds all files that are allowed to be part of an epub to the Book.private static voidprocessDirectory(org.apache.commons.vfs2.FileObject rootDir, org.apache.commons.vfs2.FileObject directory, List<TOCReference> sections, Resources resources, String inputEncoding) private static voidprocessSubdirectory(org.apache.commons.vfs2.FileObject rootDir, org.apache.commons.vfs2.FileObject file, List<TOCReference> sections, Resources resources, String inputEncoding)
-
Field Details
-
fileComparator
-
bookProcessor
-
-
Constructor Details
-
FilesetBookCreator
public FilesetBookCreator()
-
-
Method Details
-
createBookFromDirectory
- Throws:
IOException
-
createBookFromDirectory
- Throws:
IOException
-
createBookFromDirectory
public static Book createBookFromDirectory(org.apache.commons.vfs2.FileObject rootDirectory) throws IOException - Throws:
IOException
-
createBookFromDirectory
public static Book createBookFromDirectory(org.apache.commons.vfs2.FileObject rootDirectory, String encoding) throws IOException Recursively adds all files that are allowed to be part of an epub to the Book.- Parameters:
rootDirectory-- Returns:
- the newly created Book
- Throws:
IOException- See Also:
-
processDirectory
private static void processDirectory(org.apache.commons.vfs2.FileObject rootDir, org.apache.commons.vfs2.FileObject directory, List<TOCReference> sections, Resources resources, String inputEncoding) throws IOException - Throws:
IOException
-
processSubdirectory
private static void processSubdirectory(org.apache.commons.vfs2.FileObject rootDir, org.apache.commons.vfs2.FileObject file, List<TOCReference> sections, Resources resources, String inputEncoding) throws IOException - Throws:
IOException
-