Package org.jpedal.external
Interface ErrorTracker
public interface ErrorTracker
The ErrorTracker interface allows monitoring of page decode progress and can be used to end a page decode early.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddPageFailureMessage(String memory_error_decoding_token_stream) Supply a failure message if the page decode was not successful.booleancheckForExitRequest(int dataPointer, int streamSize) Used to request an early exit from page decoding.voidfinishedPageDecoding(int rawPage) Called when the page has finished decoding.Returns if the message if the page failed to decode.booleanReturns whether the page decode should be considered succesful.voidstartedPageDecoding(int rawPage) Called when the page has begun decoding.
-
Method Details
-
addPageFailureMessage
Supply a failure message if the page decode was not successful.- Parameters:
memory_error_decoding_token_stream- the error message
-
getPageFailureMessage
String getPageFailureMessage()Returns if the message if the page failed to decode..- Returns:
- if the message if the page failed to decode
-
ispageSuccessful
boolean ispageSuccessful()Returns whether the page decode should be considered succesful..- Returns:
- whether the page decode should be considered succesful
-
checkForExitRequest
boolean checkForExitRequest(int dataPointer, int streamSize) Used to request an early exit from page decoding.- Parameters:
dataPointer- the current index of the content stream operatorstreamSize- the length of the stream- Returns:
- whether to exit from page decoding
-
finishedPageDecoding
void finishedPageDecoding(int rawPage) Called when the page has finished decoding.- Parameters:
rawPage- the page that was decoded
-
startedPageDecoding
void startedPageDecoding(int rawPage) Called when the page has begun decoding.- Parameters:
rawPage- the page that is being decoded
-