KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jxl > read > biff > BiffException


1 /*********************************************************************
2 *
3 * Copyright (C) 2002 Andrew Khan
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 ***************************************************************************/

19
20 package jxl.read.biff;
21
22 import jxl.JXLException;
23
24 /**
25  * Exception thrown when reading a biff file
26  */

27 public class BiffException extends JXLException
28 {
29   /**
30    * Inner class containing the various error messages
31    */

32   private static class BiffMessage
33   {
34     /**
35      * The formatted message
36      */

37     public String JavaDoc message;
38     /**
39      * Constructs this exception with the specified message
40      *
41      * @param m the messageA
42      */

43     BiffMessage(String JavaDoc m)
44     {
45       message = m;
46     }
47   }
48
49   /**
50    */

51   static final BiffMessage unrecognizedBiffVersion =
52     new BiffMessage("Unrecognized biff version");
53
54   /**
55    */

56   static final BiffMessage expectedGlobals =
57     new BiffMessage("Expected globals");
58
59   /**
60    */

61   static final BiffMessage excelFileTooBig =
62     new BiffMessage("Warning: not all of the excel file could be read");
63
64   /**
65    */

66   static final BiffMessage excelFileNotFound =
67     new BiffMessage("The input file was not found");
68
69   /**
70    */

71   static final BiffMessage unrecognizedOLEFile =
72     new BiffMessage("Unable to recognize OLE stream");
73
74   /**
75    */

76   static final BiffMessage streamNotFound =
77     new BiffMessage("Compound file does not contain the specified stream");
78
79   /**
80    */

81   static final BiffMessage passwordProtected =
82     new BiffMessage("The workbook is password protected");
83
84   /**
85    * Constructs this exception with the specified message
86    *
87    * @param m the message
88    */

89   public BiffException(BiffMessage m)
90   {
91     super(m.message);
92   }
93 }
94
Popular Tags