public class XSSFPictureData extends org.apache.poi.ooxml.POIXMLDocumentPart implements PictureData
Modifier and Type | Method and Description |
---|---|
byte[] |
getData()
Gets the picture data as a byte array.
|
String |
getMimeType()
Returns the mime type for the image
|
int |
getPictureType()
Return an integer constant that specifies type of this picture
|
String |
suggestFileExtension()
Suggests a file extension for this image.
|
_invokeOnDocumentRead, addRelation, createRelationship, createRelationship, createRelationship, getPackagePart, getParent, getRelationById, getRelationId, getRelationPartById, getRelationParts, getRelations, isCommited, isCommitted, setCommited, setCommitted, toString
public byte[] getData()
Note, that this call might be expensive since all the picture data is copied into a temporary byte array.
You can grab the picture data directly from the underlying package part as follows:
InputStream is = getPackagePart().getInputStream();
getData
in interface PictureData
public String suggestFileExtension()
suggestFileExtension
in interface PictureData
public int getPictureType()
getPictureType
in interface PictureData
Workbook.PICTURE_TYPE_EMF
,
Workbook.PICTURE_TYPE_WMF
,
Workbook.PICTURE_TYPE_PICT
,
Workbook.PICTURE_TYPE_JPEG
,
Workbook.PICTURE_TYPE_PNG
,
Workbook.PICTURE_TYPE_DIB
public String getMimeType()
PictureData
getMimeType
in interface PictureData
Copyright © 2010 - 2020 Adobe. All Rights Reserved