| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.poi.POIXMLDocumentPart
org.apache.poi.xslf.usermodel.XSLFPictureData
@Beta public final class XSLFPictureData
Instantiates sub-classes of POIXMLDocumentPart depending on their relationship type
| Field Summary | |
|---|---|
| static int | PICTURE_TYPE_BMPWindows Bitmap (.bmp) | 
| static int | PICTURE_TYPE_DIBDevice independent bitmap | 
| static int | PICTURE_TYPE_EMFExtended windows meta file | 
| static int | PICTURE_TYPE_EPSEncapsulated Postscript (.eps) | 
| static int | PICTURE_TYPE_GIFGIF image format | 
| static int | PICTURE_TYPE_JPEGJPEG format | 
| static int | PICTURE_TYPE_PICTMac PICT format | 
| static int | PICTURE_TYPE_PNGPNG format | 
| static int | PICTURE_TYPE_TIFFTag Image File (.tiff) | 
| static int | PICTURE_TYPE_WMFWindows Meta File | 
| static int | PICTURE_TYPE_WPGWordPerfect graphics (.wpg) | 
| protected static POIXMLRelation[] | RELATIONSRelationships for each known picture type | 
| Fields inherited from class org.apache.poi.POIXMLDocumentPart | 
|---|
| DEFAULT_XML_OPTIONS | 
| Constructor Summary | |
|---|---|
| protected  | XSLFPictureData()Create a new XSLFGraphicData node | 
|   | XSLFPictureData(PackagePart part,
                PackageRelationship rel)Construct XSLFPictureData from a package part | 
| Method Summary | |
|---|---|
|  byte[] | getData()Gets the picture data as a byte array. | 
|  java.lang.String | getFileName()Returns the file name of the image, eg image7.jpg . | 
|  int | getPictureType()Return an integer constant that specifies type of this picture | 
|  java.lang.String | suggestFileExtension()Suggests a file extension for this image. | 
| Methods inherited from class org.apache.poi.POIXMLDocumentPart | 
|---|
| addRelation, commit, createRelationship, createRelationship, createRelationship, getPackagePart, getPackageRelationship, getParent, getRelationById, getRelationId, getRelations, getTargetPart, onDocumentCreate, onDocumentRead, onDocumentRemove, onSave, read, rebase, removeRelation, removeRelation, toString | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
public static final int PICTURE_TYPE_EMF
public static final int PICTURE_TYPE_WMF
public static final int PICTURE_TYPE_PICT
public static final int PICTURE_TYPE_JPEG
public static final int PICTURE_TYPE_PNG
public static final int PICTURE_TYPE_DIB
public static final int PICTURE_TYPE_GIF
public static final int PICTURE_TYPE_TIFF
public static final int PICTURE_TYPE_EPS
public static final int PICTURE_TYPE_BMP
public static final int PICTURE_TYPE_WPG
protected static final POIXMLRelation[] RELATIONS
| Constructor Detail | 
|---|
protected XSLFPictureData()
public XSLFPictureData(PackagePart part,
                       PackageRelationship rel)
part - the package part holding the drawing data,rel - the package relationship holding this drawing,
             the relationship type must be http://schemas.openxmlformats.org/officeDocument/2006/relationships/image| Method Detail | 
|---|
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();
 
 
public java.lang.String getFileName()
public java.lang.String suggestFileExtension()
public int getPictureType()
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||