List of usage examples for org.apache.poi.hpsf ClassID POWERPOINT97
ClassID POWERPOINT97
To view the source code for org.apache.poi.hpsf ClassID POWERPOINT97.
Click Source Link
From source file:com.pnf.plugin.ole.parser.streams.ContainerStream.java
License:Apache License
public OleType getType() { if (type == null) { type = OleType.UNKNOWN;//from ww w .j av a2 s . c o m // First try to use ClassID to identify the type of container if (storageId != null) { if (ClassID.WORD_OXML.equals(storageId)) type = OleType.DOCX; else if (ClassID.WORD97.equals(storageId) || ClassID.WORD95.equals(storageId)) type = OleType.DOC; else if (ClassID.POWERPOINT97.equals(storageId) || ClassID.POWERPOINT95.equals(storageId)) type = OleType.PPT; else if (ClassID.EXCEL97.equals(storageId) || ClassID.EXCEL95.equals(storageId)) type = OleType.XLS; } if (type == OleType.UNKNOWN) { // Read document streams to check the type of this container for (Stream s : documentStreams) { if (hasMatch(s, XLS_STREAMS)) type = OleType.XLS; else if (hasMatch(s, DOC_STREAMS)) type = OleType.DOC; else if (hasMatch(s, PPT_STREAMS)) type = OleType.PPT; } } } return type; }