Package org.apache.poi.sl.usermodel
Interface ObjectShape<S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>>
-
- All Superinterfaces:
PlaceableShape<S,P>,Shape<S,P>
- All Known Implementing Classes:
HSLFObjectShape,XSLFObjectShape
public interface ObjectShape<S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>> extends Shape<S,P>, PlaceableShape<S,P>
An shape which references an embedded OLE object- Since:
- POI 4.0.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.lang.StringgetFullName()Returns the full name of the embedded object, e.g.ObjectDatagetObjectData()PictureDatagetPictureData()Returns the picture data for this picture.java.lang.StringgetProgId()Returns the ProgID that stores the OLE Programmatic Identifier.default java.io.InputStreamreadObjectData()Reads the ole data as stream - the application specific stream is served Theraw dataserves the outer/wrapped object, which is usually aPOIFSFileSystemstream, whereas this method return the unwrapped entrydefault java.io.InputStreamreadObjectDataRaw()Convenience method to return the raw data asInputStreamjava.io.OutputStreamupdateObjectData(ObjectMetaData.Application application, ObjectMetaData metaData)Updates the ole data.-
Methods inherited from interface org.apache.poi.sl.usermodel.PlaceableShape
getAnchor, getFlipHorizontal, getFlipVertical, getParent, getRotation, getSheet, setAnchor, setFlipHorizontal, setFlipVertical, setRotation
-
Methods inherited from interface org.apache.poi.sl.usermodel.Shape
draw, getAnchor, getParent, getShapeId, getShapeName, getSheet
-
-
-
-
Method Detail
-
getPictureData
PictureData getPictureData()
Returns the picture data for this picture.- Returns:
- the picture data for this picture.
-
getProgId
java.lang.String getProgId()
Returns the ProgID that stores the OLE Programmatic Identifier. A ProgID is a string that uniquely identifies a given object, for example, "Word.Document.8" or "Excel.Sheet.8".- Returns:
- the ProgID
-
getFullName
java.lang.String getFullName()
Returns the full name of the embedded object, e.g. "Microsoft Word Document" or "Microsoft Office Excel Worksheet".- Returns:
- the full name of the embedded object
-
updateObjectData
java.io.OutputStream updateObjectData(ObjectMetaData.Application application, ObjectMetaData metaData) throws java.io.IOException
Updates the ole data. If there wasn't an object registered before, a new ole embedding is registered in the parent slideshow.For HSLF this needs to be a
POIFSFileSystemstream.- Parameters:
application- a preset application enummetaData- or a custom metaData object, can benullif the application has been set- Returns:
- an
OutputStreamwhich receives the new data, the data will be persisted onclose() - Throws:
java.io.IOException- if the linked object data couldn't be found or a new object data couldn't be initialized
-
readObjectData
default java.io.InputStream readObjectData() throws java.io.IOExceptionReads the ole data as stream - the application specific stream is served Theraw dataserves the outer/wrapped object, which is usually aPOIFSFileSystemstream, whereas this method return the unwrapped entry- Returns:
- an
InputStreamwhich serves the object data - Throws:
java.io.IOException- if the linked object data couldn't be found
-
readObjectDataRaw
default java.io.InputStream readObjectDataRaw() throws java.io.IOExceptionConvenience method to return the raw data asInputStream- Returns:
- the raw data stream
- Throws:
java.io.IOException- if the data couldn't be retrieved
-
getObjectData
ObjectData getObjectData()
- Returns:
- the data object
-
-