com.canoo.webtest.plugins.exceltest
Class RetryWithCapsPOIFSFileSystem

java.lang.Object
  extended by org.apache.poi.poifs.filesystem.POIFSFileSystem
      extended by com.canoo.webtest.plugins.exceltest.RetryWithCapsPOIFSFileSystem
All Implemented Interfaces:
org.apache.poi.poifs.dev.POIFSViewable

public class RetryWithCapsPOIFSFileSystem
extends org.apache.poi.poifs.filesystem.POIFSFileSystem

Hack class to deal with Excel files generated by Crystal Decisions. The root element of an Excel file is supposed to be 'Workbook' but in Crystal Decisions files, it is 'WORKBOOK'. Excel will still open the file but it causes POI to fail upon opening the file. This class catches the FileNotFoundException that is thrown when this happens and tries again with the name capitalized.

Author:
Rob Nielsen

Constructor Summary
RetryWithCapsPOIFSFileSystem(InputStream inputStream)
           
 
Method Summary
 org.apache.poi.poifs.filesystem.DocumentInputStream createDocumentInputStream(String name)
           
 
Methods inherited from class org.apache.poi.poifs.filesystem.POIFSFileSystem
createDirectory, createDocument, createDocument, createNonClosingInputStream, getBigBlockSize, getRoot, getShortDescription, getViewableArray, getViewableIterator, hasPOIFSHeader, main, preferArray, writeFilesystem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RetryWithCapsPOIFSFileSystem

public RetryWithCapsPOIFSFileSystem(InputStream inputStream)
                             throws IOException
Throws:
IOException
Method Detail

createDocumentInputStream

public org.apache.poi.poifs.filesystem.DocumentInputStream createDocumentInputStream(String name)
                                                                              throws IOException
Overrides:
createDocumentInputStream in class org.apache.poi.poifs.filesystem.POIFSFileSystem
Throws:
IOException

Copyright © 2001-2007 Canoo Engineering AG, Basel. All rights reserved.