poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Burch <nick.bu...@alfresco.com>
Subject Re: InvalidOperation retrieving InputStream
Date Wed, 20 Jul 2011 22:41:57 GMT
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: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Mime
View raw message