Top Description Methods
org.apache.poi.sl.usermodel

public Interface ObjectShape<S extends Shape<S, P>, P extends TextParagraph<S, P, ? extends TextRun>>

extends Shape<S extends Shape<S, P>, P extends TextParagraph<S, P, ? extends TextRun>>, PlaceableShape<S extends Shape<S, P>, P extends TextParagraph<S, P, ? extends TextRun>>
Imports
java.io.IOException, .InputStream, .OutputStream, org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream, org.apache.poi.poifs.filesystem.DirectoryNode, .FileMagic, .POIFSFileSystem, org.apache.poi.sl.usermodel.ObjectMetaData.Application, org.apache.poi.util.IOUtils

An shape which references an embedded OLE object
Since
POI 4.0.0

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the full name of the embedded object
getFullName
()

Returns the full name of the embedded object, e.g. "Microsoft Word Document" or "Microsoft Office Excel Worksheet".

public ObjectData

Returns:

the data object
getObjectData
()

public PictureData

Returns:

the picture data for this picture.
getPictureData
()

Returns the picture data for this picture.

public String

Returns:

the ProgID
getProgId
()

Returns the ProgID that stores the OLE Programmatic Identifier.

public default InputStream

Returns:

an InputStream which serves the object data
readObjectData
()

Reads the ole data as stream - the application specific stream is served The raw data serves the outer/wrapped object, which is usually a POIFSFileSystem stream, whereas this method return the unwrapped entry

public default InputStream

Returns:

the raw data stream
readObjectDataRaw
()

Convenience method to return the raw data as InputStream

public OutputStream

Returns:

an OutputStream which receives the new data, the data will be persisted on close()
updateObjectData
(ObjectMetaData.Application
a preset application enum
application
,
ObjectMetaData
or a custom metaData object, can be null if the application has been set
metaData
)

Updates the ole data.

Inherited from org.apache.poi.sl.usermodel.PlaceableShape:
getAnchorgetFlipHorizontalgetFlipVerticalgetParentgetRotationgetSheetsetAnchorsetFlipHorizontalsetFlipVerticalsetRotation
Inherited from org.apache.poi.sl.usermodel.Shape:
drawgetAnchorgetParentgetShapeIdgetShapeNamegetSheet

Method Detail

getFullNameback to summary
public String getFullName()

Returns the full name of the embedded object, e.g. "Microsoft Word Document" or "Microsoft Office Excel Worksheet".

Returns:String

the full name of the embedded object

getObjectDataback to summary
public ObjectData getObjectData()
Returns:ObjectData

the data object

getPictureDataback to summary
public PictureData getPictureData()

Returns the picture data for this picture.

Returns:PictureData

the picture data for this picture.

getProgIdback to summary
public 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:String

the ProgID

readObjectDataback to summary
public default InputStream readObjectData() throws IOException

Reads the ole data as stream - the application specific stream is served The raw data serves the outer/wrapped object, which is usually a POIFSFileSystem stream, whereas this method return the unwrapped entry

Returns:InputStream

an InputStream which serves the object data

Exceptions
IOException:
if the linked object data couldn't be found
readObjectDataRawback to summary
public default InputStream readObjectDataRaw() throws IOException

Convenience method to return the raw data as InputStream

Returns:InputStream

the raw data stream

Exceptions
IOException:
if the data couldn't be retrieved
updateObjectDataback to summary
public OutputStream updateObjectData(ObjectMetaData.Application application, ObjectMetaData metaData) throws 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 POIFSFileSystem stream.

Parameters
application:ObjectMetaData.Application

a preset application enum

metaData:ObjectMetaData

or a custom metaData object, can be null if the application has been set

Returns:OutputStream

an OutputStream which receives the new data, the data will be persisted on close()

Exceptions
IOException:
if the linked object data couldn't be found or a new object data couldn't be initialized