org.apache.poi.ss.usermodel

## Interface ObjectData

- All Superinterfaces:
    Shape, SimpleShape
  All Known Implementing Classes:
    HSSFObjectData, XSSFObjectData

      public interface ObjectData
      extends SimpleShape

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

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default java.lang.String` | `getContentType()`
    `DirectoryEntry` | `getDirectory()` Gets the object data.
    `java.lang.String` | `getFileName()`
    `byte[]` | `getObjectData()`
    `java.lang.String` | `getOLE2ClassName()`
    `PictureData` | `getPictureData()`
    `boolean` | `hasDirectoryEntry()`

    - ### Methods inherited from interface org.apache.poi.ss.usermodel.SimpleShape

      `getShapeId`

    - ### Methods inherited from interface org.apache.poi.ss.usermodel.Shape

      `getAnchor, getParent, getShapeName, isNoFill, setFillColor, setLineStyleColor, setNoFill`

- - ### Method Detail

    - #### getObjectData

          byte[] getObjectData()
                        throws java.io.IOException

      Returns:
        the data portion, for an ObjectData that doesn't have an associated POIFS Directory Entry
      Throws:
        `java.io.IOException`

    - #### hasDirectoryEntry

          boolean hasDirectoryEntry()

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

    - #### getDirectory

          DirectoryEntry getDirectory()
                               throws java.io.IOException

      Gets the object data. Only call for ones that have data though. See `hasDirectoryEntry()`. The caller has to close the corresponding POIFSFileSystem
      Returns:
        the object data as an OLE2 directory.
      Throws:
        `java.io.IOException` - if there was an error reading the data.

    - #### getOLE2ClassName

          java.lang.String getOLE2ClassName()

      Returns:
        the OLE2 Class Name of the object

    - #### getFileName

          java.lang.String getFileName()

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

    - #### getPictureData

          PictureData getPictureData()

      Returns:
        the preview picture

    - #### getContentType

          default java.lang.String getContentType()

Copyright 2020 The Apache Software Foundation or its licensors, as applicable.