Package 

Class EpubParser

  • All Implemented Interfaces:
    org.readium.r2.streamer.parser.PublicationParser

    
    public final class EpubParser
     implements PublicationParser
                        

    Parses a Publication from an EPUB publication.

    • Method Summary

      Modifier and Type Method Description
      Try<Publication.Builder, PublicationParser.ParseError> parse(Asset asset, WarningLogger warnings) Constructs a Publication.Builder to build a Publication from a publication asset.
      final <R extends Any> R readDecodeOrElse(Readable $self, Url url, Function1<ByteArray, Try<R, DecodeError>> decode, Function1<ReadError, R> recover)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EpubParser

        EpubParser(EpubPositionsService.ReflowableStrategy reflowablePositionsStrategy)
        Parameters:
        reflowablePositionsStrategy - Strategy used to calculate the number of positions in a reflowable resource.
    • Method Detail

      • parse

         Try<Publication.Builder, PublicationParser.ParseError> parse(Asset asset, WarningLogger warnings)

        Constructs a Publication.Builder to build a Publication from a publication asset.

        Parameters:
        asset - Publication asset.
        warnings - Used to report non-fatal parsing warnings, such as publication authoring mistakes.
      • readDecodeOrElse

         final <R extends Any> R readDecodeOrElse(Readable $self, Url url, Function1<ByteArray, Try<R, DecodeError>> decode, Function1<ReadError, R> recover)