mirror of
https://github.com/gedoor/legado.git
synced 2024-08-30 09:23:26 +08:00
优化
This commit is contained in:
parent
c8b4a9fe30
commit
461664be81
@ -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,
|
||||
public static Resources loadResources(
|
||||
ZipFile zipFile,
|
||||
String defaultHtmlEncoding,
|
||||
List<MediaType> lazyLoadedTypes) throws IOException {
|
||||
List<MediaType> lazyLoadedTypes
|
||||
) throws IOException {
|
||||
|
||||
LazyResourceProvider resourceProvider =
|
||||
new EpubResourceProvider(zipFile.getName());
|
||||
|
Loading…
Reference in New Issue
Block a user