Package com.independentsoft.office.word

# 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 Summary

  Constructors
  Constructor
  Description
  `AltChunk()`
  Instantiates a new alt chunk.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `AltChunk`
  `clone()`
  Clones this instance.
  `byte[]`
  `getContent()`
  Gets the embedded content bytes.
  `List<IContentElement>`
  `getContentElements()`
  `String`
  `getContentType()`
  Gets the content type.
  `String`
  `getFileName()`
  Gets the file name.
  `AltChunkProperties`
  `getProperties()`
  Gets the altChunk properties.
  `void`
  `setContent​(byte[] content)`
  Sets the embedded content bytes.
  `void`
  `setContentType​(String contentType)`
  Sets the content type.
  `void`
  `setFileName​(String fileName)`
  Sets the file name.
  `void`
  `setProperties​(AltChunkProperties properties)`
  Sets the altChunk properties.
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## 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