Package com.extentech.formats.LEO

Examples of com.extentech.formats.LEO.InvalidFileException


      int compat = ByteTools.readInt(this.getByteAt(12),this.getByteAt(13),this.getByteAt(14),this.getByteAt(15)); // 1996
      xlsver = compat + "";
        oldlen = this.getLength();
        if(oldlen < 16){
          Logger.logErr("Not Excel '97 (BIFF8) or later version.  Unsupported file format.");
          throw new InvalidFileException("InvalidFileException: Not Excel '97 (BIFF8) or later version.  Unsupported file format.");
        }
    }
View Full Code Here


      }
      ByteBuffer bbf = ByteBuffer.wrap(b);
       bbf.order(ByteOrder.LITTLE_ENDIAN);
      myLEOFile = new LEOFile(bbf);
    }catch(Exception e) {
        throw new InvalidFileException("WorkBook could not be instantiated: "+ e.toString());
    }
    this.initFromLeoFile(myLEOFile);
    }
View Full Code Here

                String errstr ="Instantiating WorkBookHandle failed: " + e.toString();
                throw new com.extentech.formats.XLS.WorkBookException(errstr, WorkBookException.UNSPECIFIED_INIT_ERROR);
            }
        }else{
            Logger.logWarn("Initializing WorkBookHandle failed: byte array does not contain a supported Excel WorkBook.");
            throw new InvalidFileException("byte array does not contian a supported Excel WorkBook.");
        }
  }
View Full Code Here

    if(myLEOFile.hasWorkBook()){
      this.initFromLeoFile(myLEOFile);
    }else{
        // total failure to load
      Logger.logErr("Initializing WorkBookHandle failed: " + fname + " does not contain a supported Excel WorkBook.");
      throw new InvalidFileException(fname +  " does not contian a supported Excel WorkBook.");
    }
  }
View Full Code Here

        byte[] b = getPrototypeBook();
      ByteBuffer bbf = ByteBuffer.wrap(b);
       bbf.order(ByteOrder.LITTLE_ENDIAN);
      myLEOFile = new LEOFile(bbf);
    }catch(Exception e) {
        throw new InvalidFileException("WorkBook could not be instantiated: "+ e.toString());
    }
    this.initFromLeoFile(myLEOFile);
  }
View Full Code Here

TOP

Related Classes of com.extentech.formats.LEO.InvalidFileException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.