Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
What Is poi-ooxml-5.2.3.jar?
What Is poi-ooxml-5.2.3.jar?
✍: FYIcenter.com
poi-ooxml-5.2.3.jar is one of the JAR files for Apache POI 5.2.3, which provides an API for Microsoft document files of Word, Excel, PowerPoint, and Visio.
poi-ooxml-5.2.3.jar supports Apache POI components that read and write Microsoft's Open Office XML document format, which is used in recent versions of Microsoft Office tools like Word 2007, Excel 2007, PowerPoint 2007, etc.
poi-ooxml-5.2.3.jar is distributed as part of the poi-bin-5.2.3-20220909.zip download file.
JAR File Size and Download Location:
JAR name: poi-ooxml-5.2.3.jar Target JDK version: 9 Dependency: poi.jar xmlbeans.jar ooxml-schemas.jar commons-collections.jar junit.jar File name: poi-ooxml.jar, poi-ooxml-5.2.3.jar File size: 2010497 bytes Release date: 09-09-2022 Download: Apache POI Website
Here are Java Source Code files for poi-ooxml-5.2.3.jar:
⏎ org/apache/poi/ooxml/POIXMLDocument.java
/* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ package org.apache.poi.ooxml; import java.io.Closeable; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.openxml4j.exceptions.OpenXML4JException; import org.apache.poi.openxml4j.opc.OPCPackage; import org.apache.poi.openxml4j.opc.PackageAccess; import org.apache.poi.openxml4j.opc.PackagePart; import org.apache.poi.openxml4j.opc.PackageRelationship; import org.apache.poi.openxml4j.opc.PackageRelationshipCollection; import org.apache.xmlbeans.impl.common.SystemCache; /** * This holds the common functionality for all POI OOXML Document classes. */ public abstract class POIXMLDocument extends POIXMLDocumentPart implements Closeable { public static final String DOCUMENT_CREATOR = "Apache POI"; // OLE embeddings relation name public static final String OLE_OBJECT_REL_TYPE="http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject"; // Embedded OPC documents relation name public static final String PACK_OBJECT_REL_TYPE="http://schemas.openxmlformats.org/officeDocument/2006/relationships/package"; /** The OPC Package */ private OPCPackage pkg; /** * The properties of the OPC package, opened as needed */ private POIXMLProperties properties; protected POIXMLDocument(OPCPackage pkg) { super(pkg); init(pkg); } protected POIXMLDocument(OPCPackage pkg, String coreDocumentRel) { super(pkg, coreDocumentRel); init(pkg); } private void init(OPCPackage p) { this.pkg = p; // Workaround for XMLBEANS-512 - ensure that when we parse // the file, we start with a fresh XML Parser each time, // and avoid the risk of getting a SaxHandler that's in error SystemCache.get().setSaxLoader(null); } /** * Wrapper to open a package, which works around shortcomings in java's this() constructor calls * * @param path the path to the document * @return the new OPCPackage * * @throws IOException if there was a problem opening the document */ public static OPCPackage openPackage(String path) throws IOException { try { return OPCPackage.open(path); } catch (InvalidFormatException e) { throw new IOException(e.toString(), e); } } /** * Get the assigned OPCPackage * * @return the assigned OPCPackage */ public OPCPackage getPackage() { return this.pkg; } protected PackagePart getCorePart() { return getPackagePart(); } /** * Retrieves all the PackageParts which are defined as relationships of the base document with the * specified content type. * * @param contentType the content type * * @return all the base document PackageParts which match the content type * * @throws InvalidFormatException when the relationships or the parts contain errors * * @see org.apache.poi.xssf.usermodel.XSSFRelation * @see org.apache.poi.xslf.usermodel.XSLFRelation * @see org.apache.poi.xwpf.usermodel.XWPFRelation * @see org.apache.poi.xdgf.usermodel.XDGFRelation */ protected PackagePart[] getRelatedByType(String contentType) throws InvalidFormatException { PackageRelationshipCollection partsC = getPackagePart().getRelationshipsByType(contentType); PackagePart[] parts = new PackagePart[partsC.size()]; int count = 0; for (PackageRelationship rel : partsC) { parts[count] = getPackagePart().getRelatedPart(rel); count++; } return parts; } /** * Get the document properties. This gives you access to the * core ooxml properties, and the extended ooxml properties. * * @return the document properties */ public POIXMLProperties getProperties() { if(properties == null) { try { properties = new POIXMLProperties(pkg); } catch (Exception e){ throw new POIXMLException(e); } } return properties; } /** * Get the document's embedded files. * * @return the document's embedded files * * @throws OpenXML4JException if the embedded parts can't be determined * @since POI 4.0.0 */ public abstract List<PackagePart> getAllEmbeddedParts() throws OpenXML4JException; protected final void load(POIXMLFactory factory) throws IOException { Map<PackagePart, POIXMLDocumentPart> context = new HashMap<>(); try { read(factory, context); } catch (OpenXML4JException e){ throw new POIXMLException(e); } onDocumentRead(); context.clear(); } /** * Closes the underlying {@link OPCPackage} from which this * document was read, if there is one * * <p>Once this has been called, no further * operations, updates or reads should be performed on the * document. * * @throws IOException for writable packages, if an IO exception occur during the saving process. */ @Override public void close() throws IOException { if (pkg != null) { if (pkg.getPackageAccess() == PackageAccess.READ) { pkg.revert(); } else { pkg.close(); } pkg = null; } } /** * Write out this document to an {@link OutputStream}. * * Note - if the Document was opened from a {@link File} rather * than an {@link InputStream}, you <b>must</b> write out to * a different file, overwriting via an OutputStream isn't possible. * * If {@code stream} is a {@link java.io.FileOutputStream} on a networked drive * or has a high cost/latency associated with each written byte, * consider wrapping the OutputStream in a {@link java.io.BufferedOutputStream} * to improve write performance. * * @param stream - the java OutputStream you wish to write the file to * * @throws IOException if anything can't be written. */ @SuppressWarnings("resource") public final void write(OutputStream stream) throws IOException { OPCPackage p = getPackage(); if(p == null) { throw new IOException("Cannot write data, document seems to have been closed already"); } //force all children to commit their changes into the underlying OOXML Package // TODO Shouldn't they be committing to the new one instead? Set<PackagePart> context = new HashSet<>(); onSave(context); context.clear(); //save extended and custom properties getProperties().commit(); p.save(stream); } }
⏎ org/apache/poi/ooxml/POIXMLDocument.java
Or download all of them as a single archive file:
File name: poi-ooxml-5.2.3-src.zip File size: 1396572 bytes Release date: 2022-09-09 Download
⇒ What Is poi-excelant-5.2.3.jar?
2017-04-01, 38006👍, 0💬
Popular Posts:
What Is javamail1_1_3.zip? javamail1_1_3.zip is the binary package of JavaMail API 1.1.3 in ZIP form...
What Is poi-ooxml-5.2.3.jar? poi-ooxml-5.2.3.jar is one of the JAR files for Apache POI 5.2.3, which...
Provides a simple high-level Http server API, which can be used to build embedded HTTP servers. Both...
JDK 17 java.desktop.jmod is the JMOD file for JDK 17 Desktop module. JDK 17 Desktop module compiled ...
What Is ojdbc8.jar for Oracle 12c R2? ojdbc8.jar for Oracle 12c R2 is the JAR files of ojdbc.jar, JD...