KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > etymon > pj > exception > PdfFormatException


1 package com.etymon.pj.exception;
2
3 /**
4    An exception that gets thrown when the parser encounters invalid
5    PDF data.
6    @author Nassib Nassar
7 */

8 public class PdfFormatException
9     extends PjException {
10
11     /**
12        Creates a PdfFormatException with a detailed message.
13        @param s the detailed message.
14     */

15     public PdfFormatException(String JavaDoc s) {
16         super(s);
17     }
18     
19     /**
20        Creates a PdfFormatException with a detailed message and
21        offset. A detailed message is a String that describes this
22        particular exception.
23        @param s the detailed message.
24        @param errorOffset the position where the error is found
25        while parsing.
26     */

27     public PdfFormatException(String JavaDoc s, int errorOffset) {
28         super(s);
29         _errorOffset = errorOffset;
30     }
31
32     /**
33        Returns the position where the error was found.
34        @return the position where the error was found or -1 if no
35        position information is available.
36     */

37     public int getErrorOffset() {
38         return _errorOffset;
39     }
40
41     private int _errorOffset = -1;
42     
43 }
44
Popular Tags