KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > poi > hpsf > VariantTypeException


1 /* ====================================================================
2    Copyright 2002-2004 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         
17 package org.apache.poi.hpsf;
18
19 /**
20  * <p>This exception is thrown if HPSF encounters a problem with a variant type.
21  * Concrete subclasses specifiy the problem further.</p>
22  *
23  * @author Rainer Klute <a
24  * HREF="mailto:klute@rainer-klute.de">&lt;klute@rainer-klute.de&gt;</a>
25  * @since 2004-06-21
26  * @version $Id: VariantTypeException.java,v 1.1 2004/06/22 16:11:39 klute Exp $
27  */

28 public abstract class VariantTypeException extends HPSFException
29 {
30
31     private Object JavaDoc value;
32
33     private long variantType;
34
35
36
37     /**
38      * <p>Constructor.</p>
39      *
40      * @param variantType The variant type causing the problem
41      * @param value The value who's variant type causes the problem
42      * @param msg A message text describing the problem
43      */

44     public VariantTypeException(final long variantType, final Object JavaDoc value,
45                                 final String JavaDoc msg)
46     {
47         super(msg);
48         this.variantType = variantType;
49         this.value = value;
50     }
51
52
53
54     /**
55      * <p>Returns the offending variant type.</p>
56      *
57      * @return the offending variant type.
58      */

59     public long getVariantType()
60     {
61         return variantType;
62     }
63
64
65
66     /**
67      * <p>Returns the value who's variant type caused the problem.</p>
68      *
69      * @return the value who's variant type caused the problem
70      */

71     public Object JavaDoc getValue()
72     {
73         return value;
74     }
75
76 }
77
Popular Tags