KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > jmx > snmp > BerException


1 /*
2  * @(#)file BerException.java
3  * @(#)author Sun Microsystems, Inc.
4  * @(#)version 4.12
5  * @(#)date 08/02/09
6  *
7  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
8  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
9  *
10  */

11
12
13 package com.sun.jmx.snmp;
14
15
16
17
18
19 /**
20  * Exception thrown when a BER encoding/decoding error occurs.
21  *
22  * <p><b>This API is a Sun Microsystems internal API and is subject
23  * to change without notice.</b></p>
24  * @version 4.12 12/19/03
25  * @author Sun Microsystems, Inc
26  *
27  * @since 1.5
28  */

29
30 public class BerException extends Exception JavaDoc {
31
32   public static final int BAD_VERSION=1;
33
34   private int errorType= 0;
35
36   public BerException() {
37     errorType= 0;
38   }
39
40   public BerException(int x) {
41     errorType= x;
42   }
43
44   public boolean isInvalidSnmpVersion() {
45     if (errorType == BAD_VERSION)
46       return true;
47     else
48       return false;
49   }
50 }
51
Popular Tags