*/
public void commit() throws IOException{
if(extPart == null && !NEW_EXT_INSTANCE.toString().equals(ext.props.toString())){
try {
PackagePartName prtname = PackagingURIHelper.createPartName("/docProps/app.xml");
pkg.addRelationship(prtname, TargetMode.INTERNAL, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties");
extPart = pkg.createPart(prtname, "application/vnd.openxmlformats-officedocument.extended-properties+xml");
} catch (InvalidFormatException e){
throw new POIXMLException(e);
}
}
if(custPart == null && !NEW_CUST_INSTANCE.toString().equals(cust.props.toString())){
try {
PackagePartName prtname = PackagingURIHelper.createPartName("/docProps/custom.xml");
pkg.addRelationship(prtname, TargetMode.INTERNAL, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties");
custPart = pkg.createPart(prtname, "application/vnd.openxmlformats-officedocument.custom-properties+xml");
} catch (InvalidFormatException e){
throw new POIXMLException(e);
}