Package org.docx4j.openpackaging.parts
Class JaxbXmlPartAltChunkHost<E>
java.lang.Object
org.docx4j.openpackaging.Base
org.docx4j.openpackaging.parts.Part
org.docx4j.openpackaging.parts.JaxbXmlPart<E>
org.docx4j.openpackaging.parts.JaxbXmlPartXPathAware<E>
org.docx4j.openpackaging.parts.JaxbXmlPartAltChunkHost<E>
- All Implemented Interfaces:
AltChunkInterface,XPathEnabled<E>
- Direct Known Subclasses:
DocumentPart,FooterPart,HeaderPart
public abstract class JaxbXmlPartAltChunkHost<E> extends JaxbXmlPartXPathAware<E> implements AltChunkInterface
- Since:
- 3.0.0
- Author:
- jharrop
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.LoggerlogFields inherited from class org.docx4j.openpackaging.parts.JaxbXmlPart
jaxbElement, jc, MAX_BYTES_Unmarshal_Error -
Constructor Summary
Constructors Constructor Description JaxbXmlPartAltChunkHost(PartName partName) -
Method Summary
Modifier and Type Method Description AlternativeFormatInputPartaddAltChunk(AltChunkType type, byte[] bytes)Add content from byte array of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content.AlternativeFormatInputPartaddAltChunk(AltChunkType type, byte[] bytes, int index)Add at index content from byte array of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content.AlternativeFormatInputPartaddAltChunk(AltChunkType type, byte[] bytes, ContentAccessor attachmentPoint)Add content from byte array of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content.AlternativeFormatInputPartaddAltChunk(AltChunkType type, byte[] bytes, ContentAccessor attachmentPoint, int index)Add at index content from byte array of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content.AlternativeFormatInputPartaddAltChunk(AltChunkType type, java.io.InputStream is)Add content from InputStream of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content.AlternativeFormatInputPartaddAltChunk(AltChunkType type, java.io.InputStream is, int index)Add at index content from InputStream of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content.AlternativeFormatInputPartaddAltChunk(AltChunkType type, java.io.InputStream is, ContentAccessor attachmentPoint)Add content from InputStream of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content.AlternativeFormatInputPartaddAltChunk(AltChunkType type, java.io.InputStream is, ContentAccessor attachmentPoint, int index)Add at index content from InputStream of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content.WordprocessingMLPackageconvertAltChunks()To convert an altChunk of type XHTML, this method requires docx4j-XHTMLImport.jar (LGPL) and its dependencies.Methods inherited from class org.docx4j.openpackaging.parts.JaxbXmlPartXPathAware
createBinderAndJaxbElement, getBinder, getJAXBAssociationsForXPath, getJAXBAssociationsForXPath, getJAXBNodesViaXPath, getJAXBNodesViaXPath, setJaxbElement, unmarshal, unmarshalMethods inherited from class org.docx4j.openpackaging.parts.JaxbXmlPart
addMcChoiceNamespace, getContents, getJAXBContext, getJaxbElement, getMcChoiceNamespaces, getMceIgnorable, getXML, isContentEqual, isUnmarshalled, marshal, marshal, marshal, marshal, pipe, pipe, pipe, setContents, setJAXBContext, setJaxbElement, setMceIgnorable, transform, variableReplaceMethods inherited from class org.docx4j.openpackaging.parts.Part
getContentLengthAsLoaded, getOwningRelationshipPart, getPackage, getRelationshipType, getSourceRelationship, getSourceRelationships, getVersion, remove, rename, setContentLengthAsLoaded, setOwningRelationshipPart, setPackage, setPartShortcut, setRelationshipType, setSourceRelationship, setVersionMethods inherited from class org.docx4j.openpackaging.Base
addTargetPart, addTargetPart, addTargetPart, addTargetPart, getContentType, getPartName, getRelationshipsPart, getRelationshipsPart, getUserData, reset, setContentType, setPartName, setRelationships, setUserData
-
Field Details
-
log
protected static org.slf4j.Logger log
-
-
Constructor Details
-
Method Details
-
addAltChunk
public AlternativeFormatInputPart addAltChunk(AltChunkType type, byte[] bytes) throws Docx4JExceptionDescription copied from interface:AltChunkInterfaceAdd content from byte array of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content. Note re XHTML content: Unless you really want it converted by Word, users are advised to use docx4j's XHTMLImporter instead.- Specified by:
addAltChunkin interfaceAltChunkInterface- Returns:
- Throws:
Docx4JException
-
addAltChunk
public AlternativeFormatInputPart addAltChunk(AltChunkType type, byte[] bytes, int index) throws Docx4JExceptionDescription copied from interface:AltChunkInterfaceAdd at index content from byte array of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content. Note re XHTML content: Unless you really want it converted by Word, users are advised to use docx4j's XHTMLImporter instead.- Specified by:
addAltChunkin interfaceAltChunkInterface- Returns:
- Throws:
Docx4JException
-
addAltChunk
public AlternativeFormatInputPart addAltChunk(AltChunkType type, java.io.InputStream is) throws Docx4JExceptionDescription copied from interface:AltChunkInterfaceAdd content from InputStream of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content. Note re XHTML content: Unless you really want it converted by Word, users are advised to use docx4j's XHTMLImporter instead.- Specified by:
addAltChunkin interfaceAltChunkInterface- Returns:
- Throws:
Docx4JException
-
addAltChunk
public AlternativeFormatInputPart addAltChunk(AltChunkType type, java.io.InputStream is, int index) throws Docx4JExceptionDescription copied from interface:AltChunkInterfaceAdd at index content from InputStream of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content. Note re XHTML content: Unless you really want it converted by Word, users are advised to use docx4j's XHTMLImporter instead.- Specified by:
addAltChunkin interfaceAltChunkInterface- Returns:
- Throws:
Docx4JException
-
addAltChunk
public AlternativeFormatInputPart addAltChunk(AltChunkType type, byte[] bytes, ContentAccessor attachmentPoint) throws Docx4JExceptionDescription copied from interface:AltChunkInterfaceAdd content from byte array of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content. Note re XHTML content: Unless you really want it converted by Word, users are advised to use docx4j's XHTMLImporter instead.- Specified by:
addAltChunkin interfaceAltChunkInterface- Returns:
- Throws:
Docx4JException
-
addAltChunk
public AlternativeFormatInputPart addAltChunk(AltChunkType type, byte[] bytes, ContentAccessor attachmentPoint, int index) throws Docx4JExceptionDescription copied from interface:AltChunkInterfaceAdd at index content from byte array of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content. Note re XHTML content: Unless you really want it converted by Word, users are advised to use docx4j's XHTMLImporter instead.- Specified by:
addAltChunkin interfaceAltChunkInterface- Returns:
- Throws:
Docx4JException
-
addAltChunk
public AlternativeFormatInputPart addAltChunk(AltChunkType type, java.io.InputStream is, ContentAccessor attachmentPoint) throws Docx4JExceptionDescription copied from interface:AltChunkInterfaceAdd content from InputStream of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content. Note re XHTML content: Unless you really want it converted by Word, users are advised to use docx4j's XHTMLImporter instead.- Specified by:
addAltChunkin interfaceAltChunkInterface- Returns:
- Throws:
Docx4JException
-
addAltChunk
public AlternativeFormatInputPart addAltChunk(AltChunkType type, java.io.InputStream is, ContentAccessor attachmentPoint, int index) throws Docx4JExceptionDescription copied from interface:AltChunkInterfaceAdd at index content from InputStream of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content. Note re XHTML content: Unless you really want it converted by Word, users are advised to use docx4j's XHTMLImporter instead.- Specified by:
addAltChunkin interfaceAltChunkInterface- Returns:
- Throws:
Docx4JException
-
convertAltChunks
To convert an altChunk of type XHTML, this method requires docx4j-XHTMLImport.jar (LGPL) and its dependencies.- Specified by:
convertAltChunksin interfaceAltChunkInterface- Throws:
Docx4JException
-