Return-Path: X-Original-To: apmail-poi-user-archive@www.apache.org Delivered-To: apmail-poi-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 513077C8A for ; Tue, 23 Aug 2011 09:39:03 +0000 (UTC) Received: (qmail 31089 invoked by uid 500); 23 Aug 2011 09:20:53 -0000 Delivered-To: apmail-poi-user-archive@poi.apache.org Received: (qmail 31051 invoked by uid 500); 23 Aug 2011 09:20:47 -0000 Mailing-List: contact user-help@poi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "POI Users List" Delivered-To: mailing list user@poi.apache.org Received: (qmail 31034 invoked by uid 99); 23 Aug 2011 09:20:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Aug 2011 09:20:41 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of nick.burch@alfresco.com designates 207.126.144.111 as permitted sender) Received: from [207.126.144.111] (HELO eu1sys200aog101.obsmtp.com) (207.126.144.111) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 23 Aug 2011 09:20:31 +0000 Received: from zimbra.alfresco.com ([88.151.129.3]) by eu1sys200aob101.postini.com ([207.126.147.11]) with SMTP ID DSNKTlNwyzsuSKUXLpZGaDZY/IBR1F+MDq+L@postini.com; Tue, 23 Aug 2011 09:20:11 UTC Received: from localhost (localhost.localdomain [127.0.0.1]) by zimbra.alfresco.com (Postfix) with ESMTP id 0CA1C4142D0 for ; Tue, 23 Aug 2011 10:20:11 +0100 (BST) X-Virus-Scanned: amavisd-new at unx-d-manc4.tc.ifeltd.com Received: from zimbra.alfresco.com ([127.0.0.1]) by localhost (zimbra.alfresco.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id u7OwWHam9ivQ for ; Tue, 23 Aug 2011 10:20:10 +0100 (BST) Received: from urchin.earth.li (urchin.earth.li [212.13.204.73]) (Authenticated sender: nick.burch@alfresco.com) by zimbra.alfresco.com (Postfix) with ESMTP id CAE09414282 for ; Tue, 23 Aug 2011 10:20:10 +0100 (BST) Date: Tue, 23 Aug 2011 10:20:10 +0100 (BST) From: Nick Burch X-X-Sender: nick@urchin.earth.li To: POI Users List Subject: Re: Check document type In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Checked: Checked by ClamAV on apache.org On Tue, 23 Aug 2011, Dmitry Kochelaev wrote: > How can I check what kind of document is stored in OPCPackage? In my > case it can be either DOCX or XLSX. Have a look at the logic in ExtractorFactory: public static POIXMLTextExtractor createExtractor(OPCPackage pkg) That'll show you how you can check the types against the constants to see the type Nick --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@poi.apache.org For additional commands, e-mail: user-help@poi.apache.org