com.etymon.pj.exception
Class PdfFormatException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.etymon.pj.exception.PjException
              extended by com.etymon.pj.exception.PdfFormatException
All Implemented Interfaces:
java.io.Serializable

public class PdfFormatException
extends PjException

An exception that gets thrown when the parser encounters invalid PDF data.

See Also:
Serialized Form

Field Summary
private  int _errorOffset
           
 
Constructor Summary
PdfFormatException(java.lang.String s)
          Creates a PdfFormatException with a detailed message.
PdfFormatException(java.lang.String s, int errorOffset)
          Creates a PdfFormatException with a detailed message and offset.
 
Method Summary
 int getErrorOffset()
          Returns the position where the error was found.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_errorOffset

private int _errorOffset
Constructor Detail

PdfFormatException

public PdfFormatException(java.lang.String s)
Creates a PdfFormatException with a detailed message.

Parameters:
s - the detailed message.

PdfFormatException

public PdfFormatException(java.lang.String s,
                          int errorOffset)
Creates a PdfFormatException with a detailed message and offset. A detailed message is a String that describes this particular exception.

Parameters:
s - the detailed message.
errorOffset - the position where the error is found while parsing.
Method Detail

getErrorOffset

public int getErrorOffset()
Returns the position where the error was found.

Returns:
the position where the error was found or -1 if no position information is available.