Class UnzippedPartStore
java.lang.Object
org.docx4j.openpackaging.io3.stores.UnzippedPartStore
- All Implemented Interfaces:
PartStore
Load an unzipped package from the file system;
save it to some output stream.
TODO convert path sep in part name to suit
underlying file system.
- Since:
- 3.0
- Author:
- jharrop
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()voidAnything necessary to perfect the save operation.longgetPartSize(String partName) The size of this part in bytes.Returns null if the part does not exist.voidRename a part in the part store.voidsaveBinaryPart(Part part) voidvoidvoidsaveJaxbXmlPart(JaxbXmlPart part) voidsaveXmlPart(XmlPart part) voidDoes nothingvoidsetSourcePartStore(PartStore partStore) Set this if its different to the target part store (ie this object)
-
Constructor Details
-
UnzippedPartStore
- Throws:
Docx4JException
-
-
Method Details
-
setSourcePartStore
Set this if its different to the target part store (ie this object)- Specified by:
setSourcePartStorein interfacePartStore
-
loadPart
Description copied from interface:PartStoreReturns null if the part does not exist. This will happen when calling code optimistically tries to fetch a rels part (which may or may not exist). Note: JaxbXmlPart and JaxbXmlPartXPathAware both unmarshal lazily (ie can invoke this sometime after the docx is loaded). Caller (generally docx4j itself) should close the resulting InputStream after use.- Specified by:
loadPartin interfacePartStore- Returns:
- Throws:
Docx4JException
-
getPartSize
Description copied from interface:PartStoreThe size of this part in bytes. Return -1 if the part does not exist.- Specified by:
getPartSizein interfacePartStore- Returns:
- Throws:
Docx4JException
-
rename
Description copied from interface:PartStoreRename a part in the part store. Useful where a part is being renamed, but its content has not been loaded. (The existing approach is to manually force the content to be loaded) -
setOutputStream
Does nothing- Specified by:
setOutputStreamin interfacePartStore
-
saveContentTypes
- Specified by:
saveContentTypesin interfacePartStore- Throws:
Docx4JException
-
saveJaxbXmlPart
- Specified by:
saveJaxbXmlPartin interfacePartStore- Throws:
Docx4JException
-
saveCustomXmlDataStoragePart
- Specified by:
saveCustomXmlDataStoragePartin interfacePartStore- Throws:
Docx4JException
-
saveXmlPart
- Specified by:
saveXmlPartin interfacePartStore- Throws:
Docx4JException
-
saveBinaryPart
- Specified by:
saveBinaryPartin interfacePartStore- Throws:
Docx4JException
-
finishSave
Description copied from interface:PartStoreAnything necessary to perfect the save operation. For example,- Specified by:
finishSavein interfacePartStore- Throws:
Docx4JException
-
dispose
public void dispose()
-