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-5.2.3.jar?
What Is poi-5.2.3.jar?
✍: FYIcenter.com
poi-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-5.2.3.jar supports Apache POI components that read and write Microsoft's OLE 2 Compound document format, which is used in early versions of Microsoft Office tools like Word 97, Excel 97, PowerPoint 97, etc.
poi-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-5.2.3.jar Target JDK version: 9 File name: poi.jar, poi-5.2.3.jar File size: 2964641 bytes Release date: 09-09-2022 Download: Apache POI Website
Here are Java Source Code files for poi-5.2.3.jar:
⏎ org/apache/poi/poifs/filesystem/DocumentOutputStream.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.poifs.filesystem; import java.io.IOException; import java.io.OutputStream; import org.apache.commons.io.input.UnsynchronizedByteArrayInputStream; import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream; import org.apache.poi.poifs.common.POIFSConstants; import org.apache.poi.poifs.property.DocumentProperty; /** * This class provides methods to write a DocumentEntry managed by a * {@link POIFSFileSystem} instance. */ public final class DocumentOutputStream extends OutputStream { /** the Document's size, i.e. the size of the big block data - mini block data is cached and not counted */ private int _document_size = 0; /** have we been closed? */ private boolean _closed = false; /** the actual Document */ private final POIFSDocument _document; /** and its Property */ private final DocumentProperty _property; /** our buffer, when null we're into normal blocks */ private UnsynchronizedByteArrayOutputStream _buffer = new UnsynchronizedByteArrayOutputStream(POIFSConstants.BIG_BLOCK_MINIMUM_DOCUMENT_SIZE); /** our main block stream, when we're into normal blocks */ private POIFSStream _stream; private OutputStream _stream_output; /** a write limit or -1 if unlimited */ private final long _limit; /** * Create an OutputStream from the specified DocumentEntry. * The specified entry will be emptied. * * @param document the DocumentEntry to be written */ public DocumentOutputStream(DocumentEntry document) throws IOException { this(document, -1); } /** * Create an OutputStream to create the specified new Entry * * @param parent Where to create the Entry * @param name Name of the new entry */ public DocumentOutputStream(DirectoryEntry parent, String name) throws IOException { this(createDocument(parent, name), -1); } /** * Create a DocumentOutputStream * * @param document the DocumentEntry to which the data is actually written * @param limit the maximum number of bytes that can be written */ DocumentOutputStream(DocumentEntry document, long limit) throws IOException { this(getDocument(document), limit); } DocumentOutputStream(POIFSDocument document, long limit) throws IOException { _document = document; _document.free(); _property = document.getDocumentProperty(); _limit = limit; } private static POIFSDocument getDocument(DocumentEntry document) throws IOException { if (!(document instanceof DocumentNode)) { throw new IOException("Cannot open internal document storage, " + document + " not a Document Node"); } return new POIFSDocument((DocumentNode)document); } private static DocumentEntry createDocument(DirectoryEntry parent, String name) throws IOException { if (!(parent instanceof DirectoryNode)) { throw new IOException("Cannot open internal directory storage, " + parent + " not a Directory Node"); } // Have an empty one created for now return parent.createDocument(name, new UnsynchronizedByteArrayInputStream(new byte[0])); } private void checkBufferSize() throws IOException { // Have we gone over the mini stream limit yet? if (_buffer.size() > POIFSConstants.BIG_BLOCK_MINIMUM_DOCUMENT_SIZE) { // Will need to be in the main stream byte[] data = _buffer.toByteArray(); _buffer = null; write(data, 0, data.length); } // otherwise mini stream will work, keep going } @Override public void write(int b) throws IOException { write(new byte[] { (byte)b }, 0, 1); } @Override public void write(byte[] b, int off, int len) throws IOException { if (_closed) { throw new IOException("cannot perform requested operation on a closed stream"); } if (_limit > -1 && (size() + len) > _limit) { throw new IOException("tried to write too much data"); } if (_buffer != null) { _buffer.write(b, off, len); checkBufferSize(); } else { if (_stream == null) { _stream = new POIFSStream(_document.getFileSystem()); _stream_output = _stream.getOutputStream(); } _stream_output.write(b, off, len); _document_size += len; } } @Override public void close() throws IOException { // Do we have a pending buffer for the mini stream? if (_buffer != null) { // It's not much data, so ask POIFSDocument to do it for us _document.replaceContents(_buffer.toInputStream()); } else { // We've been writing to the stream as we've gone along // Update the details on the property now _stream_output.close(); _property.updateSize(_document_size); _property.setStartBlock(_stream.getStartBlock()); } // No more! _closed = true; } /** * @return the amount of written bytes */ public long size() { return _document_size + (_buffer == null ? 0L : _buffer.size()); } }
⏎ org/apache/poi/poifs/filesystem/DocumentOutputStream.java
Or download all of them as a single archive file:
File name: poi-5.2.3-src.zip File size: 2479830 bytes Release date: 2022-09-09 Download
⇒ What Is poi-ooxml-5.2.3.jar?
⇐ What Is poi-bin-5.2.3-20220909.zip?
2017-04-04, 55310👍, 0💬
Popular Posts:
itextpdf.jar is a component in iText 5 Java library to provide core functionalities. iText Java libr...
The Digester package lets you configure an XML -> Java object mapping module, which triggers certain...
JDK 11 jdk.crypto.ec.jmod is the JMOD file for JDK 11 Crypto EC module. JDK 11 Crypto EC module comp...
ASM is an all purpose Java bytecode manipulation and analysis framework. It can be used to modify ex...
The Web Services Description Language for Java Toolkit (WSDL4J), Release 1.6.2, allows the creation,...