Class XSLFObjectData

java.lang.Object
org.apache.poi.ooxml.POIXMLDocumentPart
org.apache.poi.xslf.usermodel.XSLFObjectData
All Implemented Interfaces:
ObjectData

@Beta public final class XSLFObjectData extends POIXMLDocumentPart implements ObjectData
An XSLFOleData instance holds the ole binary stream/object
  • Constructor Details

    • XSLFObjectData

      protected XSLFObjectData()
      Create a new XSLFOleData node
    • XSLFObjectData

      public XSLFObjectData(PackagePart part)
      Construct XSLFOleData from a package part
      Parameters:
      part - the package part holding the ole data
      Since:
      POI 3.14-Beta1
  • Method Details

    • getInputStream

      public InputStream getInputStream() throws IOException
      Description copied from interface: ObjectData
      Gets an input stream which returns the binary of the embedded data.
      Specified by:
      getInputStream in interface ObjectData
      Returns:
      the input stream which will contain the binary of the embedded data.
      Throws:
      IOException
    • getOutputStream

      public OutputStream getOutputStream() throws IOException
      Specified by:
      getOutputStream in interface ObjectData
      Returns:
      the object data as stream (for writing)
      Throws:
      IOException
    • prepareForCommit

      protected void prepareForCommit()
      *PictureData objects store the actual content in the part directly without keeping a copy like all others therefore we need to handle them differently.
      Overrides:
      prepareForCommit in class POIXMLDocumentPart
    • setData

      public void setData(byte[] data) throws IOException
      Throws:
      IOException
    • getOLE2ClassName

      public String getOLE2ClassName()
      Specified by:
      getOLE2ClassName in interface ObjectData
      Returns:
      the OLE2 Class Name of the object
    • getFileName

      public String getFileName()
      Specified by:
      getFileName in interface ObjectData
      Returns:
      a filename suggestion - inspecting/interpreting the Directory object probably gives a better result