Package com.independentsoft.office.word
Class AltChunk
java.lang.Object
com.independentsoft.office.word.AltChunk
- All Implemented Interfaces:
IContentElement,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 -
Method Summary
Modifier and TypeMethodDescriptionclone()Clones this instance.byte[]Gets the embedded content bytes.Gets the content type.Gets the file name.Gets the altChunk properties.voidsetContent(byte[] content)Sets the embedded content bytes.voidsetContentType(String contentType)Sets the content type.voidsetFileName(String fileName)Sets the file name.voidsetProperties(AltChunkProperties properties)Sets the altChunk properties.toString()
-
Constructor Details
-
AltChunk
public AltChunk()Instantiates a new alt chunk.
-
-
Method Details
-
getContentElements
- Specified by:
getContentElementsin interfaceIContentElement
-
clone
Clones this instance.- Specified by:
clonein interfaceIBlockElement- Specified by:
clonein interfaceIContentElement- Overrides:
clonein classObject- Returns:
- the cloned alt chunk
-
toString
-
getProperties
Gets the altChunk properties.- Returns:
- the properties
-
setProperties
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
Gets the file name.- Returns:
- the file name
-
setFileName
Sets the file name.- Parameters:
fileName- the new file name
-
getContentType
Gets the content type.- Returns:
- the content type
-
setContentType
Sets the content type.- Parameters:
contentType- the new content type
-