I simply need to extract it for read only purposes.
-----Original Message----- From: Nick Burch [mailto:[email protected]] Sent: Wednesday, July 20, 2011 6:42 PM To: POI Users List Subject: Re: InvalidOperation retrieving InputStream On Wed, 20 Jul 2011, Pruitt, Byron S wrote: > I am having a problem with the openxml4j library in poi 3.7. > > OPCPackage pkg = OPCPackage.open(filePath); > PackagePartName corePartName = > PackagingURIHelper.createPartName("/docProps/core.xml"); > PackagePart dCore = pkg.getPart(corePartName); > > System.out.println(dCore.getContentType()); > System.out.println(dCore.getPartName().getName()); > > InputStream strmCore = dCore.getInputStream(); I think you're not supposed to work with the core part in this way. It's a special part with certain restrictions, which POI enforces What were you hoping to do with the core part? (There may well be a better way to do it) Nick --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
