Package org.apache.poi.xssf.usermodel
Class XSSFObjectData
java.lang.Object
org.apache.poi.xssf.usermodel.XSSFShape
org.apache.poi.xssf.usermodel.XSSFSimpleShape
org.apache.poi.xssf.usermodel.XSSFObjectData
- All Implemented Interfaces:
Iterable<XSSFTextParagraph>
,ObjectData
,Shape
,SimpleShape
,TextContainer
Represents binary object (i.e. OLE) data stored in the file. Eg. A GIF, JPEG etc...
-
Field Summary
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
XSSFObjectData
(XSSFDrawing drawing, org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTShape ctShape) -
Method Summary
Modifier and TypeMethodDescriptionGets the object data.The filename of the embedded imagebyte[]
org.openxmlformats.schemas.spreadsheetml.x2006.main.CTOleObject
protected XSSFSheet
getSheet()
boolean
protected static org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTShape
Prototype with the default structure of a new auto-shape.Methods inherited from class org.apache.poi.xssf.usermodel.XSSFSimpleShape
addNewTextParagraph, addNewTextParagraph, addNewTextParagraph, clearText, findDefinedParagraphProperty, findDefinedRunProperty, getBottomInset, getCTShape, getLeftInset, getRightInset, getShapeId, getShapeName, getShapeProperties, getShapeType, getText, getTextAutofit, getTextBody, getTextDirection, getTextHorizontalOverflow, getTextParagraphs, getTextVerticalOverflow, getTopInset, getVerticalAlignment, getWordWrap, iterator, setBottomInset, setLeftInset, setRightInset, setShapeType, setText, setText, setTextAutofit, setTextDirection, setTextHorizontalOverflow, setTextVerticalOverflow, setTopInset, setVerticalAlignment, setWordWrap, setXfrm
Methods inherited from class org.apache.poi.xssf.usermodel.XSSFShape
getAnchor, getDrawing, getParent, isNoFill, setFillColor, setLineStyle, setLineStyleColor, setLineWidth, setNoFill
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface org.apache.poi.ss.usermodel.Shape
getAnchor, getParent, getShapeName, isNoFill, setFillColor, setLineStyleColor, setNoFill
Methods inherited from interface org.apache.poi.ss.usermodel.SimpleShape
getShapeId
-
Constructor Details
-
XSSFObjectData
protected XSSFObjectData(XSSFDrawing drawing, org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTShape ctShape)
-
-
Method Details
-
prototype
protected static org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTShape prototype()Prototype with the default structure of a new auto-shape. -
getOLE2ClassName
- Specified by:
getOLE2ClassName
in interfaceObjectData
- Returns:
- the OLE2 Class Name of the object
-
getOleObject
public org.openxmlformats.schemas.spreadsheetml.x2006.main.CTOleObject getOleObject()- Returns:
- the CTOleObject associated with the shape
-
getObjectData
- Specified by:
getObjectData
in interfaceObjectData
- Returns:
- the data portion, for an ObjectData that doesn't have an associated POIFS Directory Entry
- Throws:
IOException
-
getObjectPart
- Returns:
- the package part of the object data
-
hasDirectoryEntry
public boolean hasDirectoryEntry()- Specified by:
hasDirectoryEntry
in interfaceObjectData
- Returns:
- does this ObjectData have an associated POIFS Directory Entry? (Not all do, those that don't have a data portion)
-
getDirectory
Description copied from interface:ObjectData
Gets the object data. Only call for ones that have data though. SeeObjectData.hasDirectoryEntry()
. The caller has to close the corresponding POIFSFileSystem- Specified by:
getDirectory
in interfaceObjectData
- Returns:
- the object data as an OLE2 directory.
- Throws:
IOException
- if there was an error reading the data.
-
getFileName
The filename of the embedded image- Specified by:
getFileName
in interfaceObjectData
- Returns:
- a filename suggestion - inspecting/interpreting the Directory object probably gives a better result
-
getSheet
-
getPictureData
- Specified by:
getPictureData
in interfaceObjectData
- Returns:
- the preview picture
-
getContentType
- Specified by:
getContentType
in interfaceObjectData
-