* footprint than an InputStream backed one.
*
* @param pkg the OpenXML4J {@code OPC Package} object.
+ * @throws IOException
+ * @throws POIXMLException a RuntimeException that can be caused by invalid OOXML data
+ * @throws RuntimeException a number of other runtime exceptions can be thrown, especially if there are problems with the
+ * input format
*/
public XSSFWorkbook(OPCPackage pkg) throws IOException {
super(pkg);
* ......
* pkg.close(); // gracefully closes the underlying zip file
* }</pre>
+ *
+ * @throws IOException
+ * @throws POIXMLException a RuntimeException that can be caused by invalid OOXML data
+ * @throws RuntimeException a number of other runtime exceptions can be thrown, especially if there are problems with the
+ * input format
*/
public XSSFWorkbook(InputStream is) throws IOException {
this(PackageHelper.open(is));
* than opening from an InputStream
*
* @param file the file to open
+ * @throws IOException
+ * @throws InvalidFormatException
+ * @throws POIXMLException a RuntimeException that can be caused by invalid OOXML data
+ * @throws RuntimeException a number of other runtime exceptions can be thrown, especially if there are problems with the
+ * input format
*/
public XSSFWorkbook(File file) throws IOException, InvalidFormatException {
this(OPCPackage.open(file));
* than opening from an InputStream
*
* @param path the file name.
+ * @throws IOException
+ * @throws POIXMLException a RuntimeException that can be caused by invalid OOXML data
+ * @throws RuntimeException a number of other runtime exceptions can be thrown, especially if there are problems with the
+ * input format
+ *
*/
public XSSFWorkbook(String path) throws IOException {
this(openPackage(path));
/**
* Constructs a XSSFWorkbook object using Package Part.
* @param part package part
+ * @throws IOException
+ * @throws POIXMLException a RuntimeException that can be caused by invalid OOXML data
+ * @throws RuntimeException a number of other runtime exceptions can be thrown, especially if there are problems with the
+ * input format
* @since POI 4.0.0
*/
public XSSFWorkbook(PackagePart part) throws IOException {
/**
* Not normally to be called externally, but possibly to be overridden to avoid
* the DOM based parse of large sheets (see examples).
+ *
+ * @throws POIXMLException a RuntimeException that can be caused by invalid OOXML data
+ * @throws RuntimeException a number of other runtime exceptions can be thrown, especially if there are problems with the
+ * input format
*/
public void parseSheet(Map<String, XSSFSheet> shIdMap, CTSheet ctSheet) {
XSSFSheet sh = shIdMap.get(ctSheet.getId());
*/
private XWPFHeaderFooterPolicy headerFooterPolicy;
+ /**
+ * @param pkg OPC package
+ * @throws IOException
+ * @throws POIXMLException a RuntimeException that can be caused by invalid OOXML data
+ * @throws RuntimeException a number of other runtime exceptions can be thrown, especially if there are problems with the
+ * input format
+ */
public XWPFDocument(OPCPackage pkg) throws IOException {
super(pkg);
load(XWPFFactory.getInstance());
}
+ /**
+ * @param is InputStream
+ * @throws IOException
+ * @throws POIXMLException a RuntimeException that can be caused by invalid OOXML data
+ * @throws RuntimeException a number of other runtime exceptions can be thrown, especially if there are problems with the
+ * input format
+ */
public XWPFDocument(InputStream is) throws IOException {
super(PackageHelper.open(is));