pull/2143/head
kunfei 2 years ago
parent c8b4a9fe30
commit 461664be81
  1. 6
      epublib/src/main/java/me/ag2s/epublib/epub/EpubReader.java
  2. 8
      epublib/src/main/java/me/ag2s/epublib/epub/ResourcesLoader.java

@ -69,8 +69,7 @@ public class EpubReader {
*/
public EpubBook readEpubLazy(@NonNull ZipFile zipFile, @NonNull String encoding)
throws IOException {
return readEpubLazy(zipFile, encoding,
Arrays.asList(MediaTypes.mediaTypes));
return readEpubLazy(zipFile, encoding, Arrays.asList(MediaTypes.mediaTypes));
}
public EpubBook readEpub(@NonNull ZipInputStream in, @NonNull String encoding) throws IOException {
@ -107,8 +106,7 @@ public class EpubReader {
}
handleMimeType(result, resources);
String packageResourceHref = getPackageResourceHref(resources);
Resource packageResource = processPackageResource(packageResourceHref,
result, resources);
Resource packageResource = processPackageResource(packageResourceHref, result, resources);
result.setOpfResource(packageResource);
Resource ncxResource = processNcxResource(packageResource, result);
result.setNcxResource(ncxResource);

@ -46,9 +46,11 @@ public class ResourcesLoader {
* @return Resources
* @throws IOException IOException
*/
public static Resources loadResources(ZipFile zipFile,
String defaultHtmlEncoding,
List<MediaType> lazyLoadedTypes) throws IOException {
public static Resources loadResources(
ZipFile zipFile,
String defaultHtmlEncoding,
List<MediaType> lazyLoadedTypes
) throws IOException {
LazyResourceProvider resourceProvider =
new EpubResourceProvider(zipFile.getName());

Loading…
Cancel
Save