com.levigo.jadice.document.read
Class ReaderListener.ReaderEvent

java.lang.Object
  extended by com.levigo.jadice.document.read.ReaderListener.ReaderEvent
All Implemented Interfaces:
SourceID, StreamSourceID
Enclosing interface:
ReaderListener

public static class ReaderListener.ReaderEvent
extends Object
implements SourceID


Nested Class Summary
static class ReaderListener.ReaderEvent.Type
           
 
Constructor Summary
ReaderListener.ReaderEvent(ReaderListener.ReaderEvent.Type type, Format format, Document document, String readID, int streamIndex, int streamPageIndex, Page page, int pageIndex, PageSegment pageSegment, int expectedPageCount, Throwable cause, ReaderControls controls)
           
 
Method Summary
 Throwable getCause()
           
 Document getDocument()
           
 int getExpectedPageCount()
          Get the total page count to be expected.
 Format getFormat()
           
 Page getPage()
           
 int getPageIndex()
           
 PageSegment getPageSegment()
           
 ReaderControls getReaderControls()
           
 String getReadID()
          Get the read-ID of the read operation during which the page segment was read.
 int getStreamIndex()
          Return the source stream's index within the read operation during which the page segment was read.
 int getStreamPageIndex()
          Get the index of the page within the stream from which the page segment was read.
 ReaderListener.ReaderEvent.Type getType()
          Return the ReaderListener.ReaderEvent.Type of this event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReaderListener.ReaderEvent

public ReaderListener.ReaderEvent(ReaderListener.ReaderEvent.Type type,
                                  Format format,
                                  Document document,
                                  String readID,
                                  int streamIndex,
                                  int streamPageIndex,
                                  Page page,
                                  int pageIndex,
                                  PageSegment pageSegment,
                                  int expectedPageCount,
                                  Throwable cause,
                                  ReaderControls controls)
Method Detail

getDocument

public Document getDocument()

getPage

public Page getPage()

getPageIndex

public int getPageIndex()

getPageSegment

public PageSegment getPageSegment()

getReadID

public String getReadID()
Description copied from interface: StreamSourceID
Get the read-ID of the read operation during which the page segment was read. This ID is, for example, derived from the ID of the Reader instance used to read the stream.

Specified by:
getReadID in interface StreamSourceID
Returns:
the read-ID

getStreamIndex

public int getStreamIndex()
Description copied from interface: StreamSourceID
Return the source stream's index within the read operation during which the page segment was read. Every Reader maintains a counter of streams that were loaded using the reader.

Specified by:
getStreamIndex in interface StreamSourceID
Returns:
the zero-based stream index

getStreamPageIndex

public int getStreamPageIndex()
Description copied from interface: SourceID
Get the index of the page within the stream from which the page segment was read.

Specified by:
getStreamPageIndex in interface SourceID
Returns:
the zero-based page index

getFormat

public Format getFormat()

getExpectedPageCount

public int getExpectedPageCount()
Get the total page count to be expected. This information is optional and will only be issued by readers for formats which expose this information. Furthermore, there is no guarantee about the validity of the total expected page count information: even if a document contains it, it might be wrong.


getCause

public Throwable getCause()

getType

public ReaderListener.ReaderEvent.Type getType()
Return the ReaderListener.ReaderEvent.Type of this event.

Returns:
the type

getReaderControls

public ReaderControls getReaderControls()


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.