KickJava   Java API By Example, From Geeks To Geeks.

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


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 import org.apache.poi.util.HexDump;
20
21 /**
22  * <p>This exception is thrown if HPSF encounters a variant type that is illegal
23  * in the current context.</p>
24  *
25  * @author Rainer Klute <a
26  * HREF="mailto:klute@rainer-klute.de">&lt;klute@rainer-klute.de&gt;</a>
27  * @since 2004-06-21
28  * @version $Id: IllegalVariantTypeException.java,v 1.1 2004/06/22 16:11:39 klute Exp $
29  */

30 public class IllegalVariantTypeException extends VariantTypeException
31 {
32
33     /**
34      * <p>Constructor</p>
35      *
36      * @param variantType The unsupported variant type
37      * @param value The value
38      * @param msg A message string
39      */

40     public IllegalVariantTypeException(final long variantType,
41                                        final Object JavaDoc value, final String JavaDoc msg)
42     {
43         super(variantType, value, msg);
44     }
45
46     /**
47      * <p>Constructor</p>
48      *
49      * @param variantType The unsupported variant type
50      * @param value The value
51      */

52     public IllegalVariantTypeException(final long variantType,
53                                        final Object JavaDoc value)
54     {
55         this(variantType, value, "The variant type " + variantType + " (" +
56              Variant.getVariantName(variantType) + ", " +
57              HexDump.toHex(variantType) + ") is illegal in this context.");
58     }
59
60 }
61
Popular Tags