1 21 22 27 28 package javax.mail.internet; 29 30 36 37 public class AddressException extends ParseException { 38 43 protected String ref = null; 44 45 50 protected int pos = -1; 51 52 private static final long serialVersionUID = 9134583443539323120L; 53 54 57 public AddressException() { 58 super(); 59 } 60 61 65 public AddressException(String s) { 66 super(s); 67 } 68 69 75 76 public AddressException(String s, String ref) { 77 super(s); 78 this.ref = ref; 79 } 80 86 public AddressException(String s, String ref, int pos) { 87 super(s); 88 this.ref = ref; 89 this.pos = pos; 90 } 91 92 96 public String getRef() { 97 return ref; 98 } 99 100 104 public int getPos() { 105 return pos; 106 } 107 108 public String toString() { 109 String s = super.toString(); 110 if (ref == null) 111 return s; 112 s += " in string ``" + ref + "''"; 113 if (pos < 0) 114 return s; 115 return s + " at position " + pos; 116 } 117 } 118 | Popular Tags |