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

public Interface ObjectData

Imports
java.io.IOException, .InputStream, .OutputStream, org.apache.logging.log4j.LogManager, .Logger, org.apache.poi.poifs.filesystem.DirectoryEntry, .FileMagic, .POIFSFileSystem, org.apache.poi.util.IOUtils

Common interface for OLE shapes, i.e. shapes linked to embedded documents
Since
POI 4.0.0

Method Summary

Modifier and TypeMethod and Description
public default byte[]

Returns:

the embedded data.
getBytes
()

Convenience method to get the embedded data as byte array.

public default 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 InputStream

Returns:

the input stream which will contain the binary of the embedded data.
getInputStream
()

Gets an input stream which returns the binary of the embedded data.

public String

Returns:

the OLE2 Class Name of the object
getOLE2ClassName
()

public OutputStream

Returns:

the object data as stream (for writing)
getOutputStream
()

public default boolean

Returns:

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

Method Detail

getBytesback to summary
public default byte[] getBytes() throws IOException

Convenience method to get the embedded data as byte array.

Returns:byte[]

the embedded data.

getDirectoryback to summary
public default 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.

Annotations
@SuppressWarnings:resource
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

getInputStreamback to summary
public InputStream getInputStream() throws IOException

Gets an input stream which returns the binary of the embedded data.

Returns:InputStream

the input stream which will contain the binary of the embedded data.

getOLE2ClassNameback to summary
public String getOLE2ClassName()
Returns:String

the OLE2 Class Name of the object

getOutputStreamback to summary
public OutputStream getOutputStream() throws IOException
Returns:OutputStream

the object data as stream (for writing)

hasDirectoryEntryback to summary
public default boolean hasDirectoryEntry()
Returns:boolean

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