Class AltChunk

java.lang.Object
com.independentsoft.office.word.AltChunk
All Implemented Interfaces:
IContentElement, IBlockElement

public class AltChunk extends Object implements IBlockElement
Represents a w:altChunk element: an embedded document chunk (typically HTML, RTF or XML) referenced from document.xml via an OPC relationship and stored as a separate part. The chunk content is captured on load and re-written as its own part on save.
  • Constructor Details

    • AltChunk

      public AltChunk()
      Instantiates a new alt chunk.
  • Method Details

    • getContentElements

      public List<IContentElement> getContentElements()
      Specified by:
      getContentElements in interface IContentElement
    • clone

      public AltChunk clone()
      Clones this instance.
      Specified by:
      clone in interface IBlockElement
      Specified by:
      clone in interface IContentElement
      Overrides:
      clone in class Object
      Returns:
      the cloned alt chunk
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getProperties

      public AltChunkProperties getProperties()
      Gets the altChunk properties.
      Returns:
      the properties
    • setProperties

      public void setProperties(AltChunkProperties properties)
      Sets the altChunk properties.
      Parameters:
      properties - the new properties
    • getContent

      public byte[] getContent()
      Gets the embedded content bytes.
      Returns:
      the content
    • setContent

      public void setContent(byte[] content)
      Sets the embedded content bytes.
      Parameters:
      content - the new content
    • getFileName

      public String getFileName()
      Gets the file name.
      Returns:
      the file name
    • setFileName

      public void setFileName(String fileName)
      Sets the file name.
      Parameters:
      fileName - the new file name
    • getContentType

      public String getContentType()
      Gets the content type.
      Returns:
      the content type
    • setContentType

      public void setContentType(String contentType)
      Sets the content type.
      Parameters:
      contentType - the new content type