KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > commons > collections > BufferOverflowException


1 /*
2  * Copyright 2002-2004 The Apache Software Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.commons.collections;
17
18 /**
19  * The BufferOverflowException is used when the buffer's capacity has been
20  * exceeded.
21  *
22  * @since Commons Collections 2.1
23  * @version $Revision: 1.9 $ $Date: 2004/02/18 01:15:42 $
24  *
25  * @author Avalon
26  * @author <a HREF="mailto:bloritsch@apache.org">Berin Loritsch</a>
27  * @author <a HREF="mailto:jefft@apache.org">Jeff Turner</a>
28  * @author Paul Jack
29  * @author Stephen Colebourne
30  */

31 public class BufferOverflowException extends RuntimeException JavaDoc {
32     
33     /** The root cause throwable */
34     private final Throwable JavaDoc throwable;
35
36     /**
37      * Constructs a new <code>BufferOverflowException</code>.
38      */

39     public BufferOverflowException() {
40         super();
41         throwable = null;
42     }
43
44     /**
45      * Construct a new <code>BufferOverflowException</code>.
46      *
47      * @param message the detail message for this exception
48      */

49     public BufferOverflowException(String JavaDoc message) {
50         this(message, null);
51     }
52
53     /**
54      * Construct a new <code>BufferOverflowException</code>.
55      *
56      * @param message the detail message for this exception
57      * @param exception the root cause of the exception
58      */

59     public BufferOverflowException(String JavaDoc message, Throwable JavaDoc exception) {
60         super(message);
61         throwable = exception;
62     }
63
64     /**
65      * Gets the root cause of the exception.
66      *
67      * @return the root cause
68      */

69     public final Throwable JavaDoc getCause() {
70         return throwable;
71     }
72     
73 }
74
Popular Tags