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

public Interface ObjectData

extends SimpleShape
Known Direct Implementers
org.apache.poi.hssf.usermodel.HSSFObjectData
Imports
java.io.IOException, org.apache.poi.poifs.filesystem.DirectoryEntry

Common interface for OLE shapes, i.e. shapes linked to embedded documents
Since
POI 3.16-beta2

Method Summary

Modifier and TypeMethod and Description
public default String
public DirectoryEntry

Returns:

the object data as an OLE2 directory.
getDirectory
()

Gets the object data.

public String

Returns:

a filename suggestion - inspecting/interpreting the Directory object probably gives a better result
getFileName
()

public byte[]

Returns:

the data portion, for an ObjectData that doesn't have an associated POIFS Directory Entry
getObjectData
()

public String

Returns:

the OLE2 Class Name of the object
getOLE2ClassName
()

public PictureData

Returns:

the preview picture
getPictureData
()

public boolean

Returns:

does this ObjectData have an associated POIFS Directory Entry? (Not all do, those that don't have a data portion)
hasDirectoryEntry
()

Inherited from org.apache.poi.ss.usermodel.SimpleShape:
getShapeId

Method Detail

getContentTypeback to summary
public default String getContentType()
getDirectoryback to summary
public DirectoryEntry getDirectory() throws IOException

Gets the object data. Only call for ones that have data though. See hasDirectoryEntry(). The caller has to close the corresponding POIFSFileSystem

Returns:DirectoryEntry

the object data as an OLE2 directory.

Exceptions
IOException:
if there was an error reading the data.
getFileNameback to summary
public String getFileName()
Returns:String

a filename suggestion - inspecting/interpreting the Directory object probably gives a better result

getObjectDataback to summary
public byte[] getObjectData() throws IOException
Returns:byte[]

the data portion, for an ObjectData that doesn't have an associated POIFS Directory Entry

getOLE2ClassNameback to summary
public String getOLE2ClassName()
Returns:String

the OLE2 Class Name of the object

getPictureDataback to summary
public PictureData getPictureData()
Returns:PictureData

the preview picture

hasDirectoryEntryback to summary
public boolean hasDirectoryEntry()
Returns:boolean

does this ObjectData have an associated POIFS Directory Entry? (Not all do, those that don't have a data portion)