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/hssf/usermodel/HSSFPictureData.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.hssf.usermodel;

import org.apache.poi.ddf.EscherBlipRecord;
import org.apache.poi.ddf.EscherRecordTypes;
import org.apache.poi.sl.image.ImageHeaderPNG;
import org.apache.poi.ss.usermodel.PictureData;
import org.apache.poi.ss.usermodel.Workbook;

/**
 * Represents binary data stored in the file.  Eg. A GIF, JPEG etc...
 */
public class HSSFPictureData implements PictureData
{
    // MSOBI constants for various formats.
    public static final short MSOBI_WMF   = 0x2160;
    public static final short MSOBI_EMF   = 0x3D40;
    public static final short MSOBI_PICT  = 0x5420;
    public static final short MSOBI_PNG   = 0x6E00;
    public static final short MSOBI_JPEG  = 0x46A0;
    public static final short MSOBI_DIB   = 0x7A80;
    // Mask of the bits in the options used to store the image format.
    public static final short FORMAT_MASK = (short) 0xFFF0;

    /**
     * Underlying escher blip record containing the bitmap data.
     */
    private final EscherBlipRecord blip;

    /**
     * Constructs a picture object.
     *
     * @param blip the underlying blip record containing the bitmap data.
     */
    public HSSFPictureData( EscherBlipRecord blip )
    {
        this.blip = blip;
    }

    /* (non-Javadoc)
     * @see org.apache.poi.hssf.usermodel.PictureData#getData()
     */
    @Override
    public byte[] getData() {
        return new ImageHeaderPNG(blip.getPicturedata()).extractPNG();
    }

    /**
     *
     * @return format of the picture.
     * @see HSSFWorkbook#PICTURE_TYPE_DIB
     * @see HSSFWorkbook#PICTURE_TYPE_WMF
     * @see HSSFWorkbook#PICTURE_TYPE_EMF
     * @see HSSFWorkbook#PICTURE_TYPE_PNG
     * @see HSSFWorkbook#PICTURE_TYPE_JPEG
     * @see HSSFWorkbook#PICTURE_TYPE_PICT
     */
    public int getFormat(){
        return blip.getRecordId() - EscherRecordTypes.BLIP_START.typeID;
    }

    /**
    * @see #getFormat
    * @return 'wmf', 'jpeg' etc depending on the format. never {@code null}
    */
    @Override
    public String suggestFileExtension() {
        switch (EscherRecordTypes.forTypeID(blip.getRecordId())) {
            case BLIP_WMF:
                return "wmf";
            case BLIP_EMF:
                return "emf";
            case BLIP_PICT:
                return "pict";
            case BLIP_PNG:
                return "png";
            case BLIP_JPEG:
                return "jpeg";
            case BLIP_DIB:
                return "dib";
            case BLIP_TIFF:
                return "tif";
            default:
                return "";
        }
    }

    @Override
    public String getMimeType() {
       switch (EscherRecordTypes.forTypeID(blip.getRecordId())) {
           case BLIP_WMF:
               return "image/x-wmf";
           case BLIP_EMF:
               return "image/x-emf";
           case BLIP_PICT:
               return "image/x-pict";
           case BLIP_PNG:
               return "image/png";
           case BLIP_JPEG:
               return "image/jpeg";
           case BLIP_DIB:
               return "image/bmp";
           case BLIP_TIFF:
               return "image/tiff";
           default:
               return "image/unknown";
       }
    }

    /**
     * @return the POI internal image type, 0 if unknown image type (was -1 prior to 5.0.0 but
     * that was inconsistent with other {@link PictureData} implementations)
     */
    @Override
    public int getPictureType() {
        switch (EscherRecordTypes.forTypeID(blip.getRecordId())) {
            case BLIP_WMF:
                return Workbook.PICTURE_TYPE_WMF;
            case BLIP_EMF:
                return Workbook.PICTURE_TYPE_EMF;
            case BLIP_PICT:
                return Workbook.PICTURE_TYPE_PICT;
            case BLIP_PNG:
                return Workbook.PICTURE_TYPE_PNG;
            case BLIP_JPEG:
                return Workbook.PICTURE_TYPE_JPEG;
            case BLIP_DIB:
                return Workbook.PICTURE_TYPE_DIB;
            case BLIP_TIFF:
                // not another int constant ...
            default:
                return 0;
        }
    }
}

org/apache/poi/hssf/usermodel/HSSFPictureData.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?

Downloading and Installing Apache POI Java Library

⇑⇑ FAQ for Apache POI (Poor Obfuscation Implementation)

2017-04-04, 55618👍, 0💬