<action dev="poi-developers" type="add">XSLFPowerPointExtractor support for including comment authors with comment text</action>
<action dev="poi-developers" type="fix">Converted XSLFPowerPointExtractor to use UserModel for all text extraction</action>
<action dev="poi-developers" type="add">XSLF initial UserModel support for Notes and Comments for Slides</action>
+ <action dev="poi-developers" type="add">HSLF: support for uncompressed OLE embeddings</action>
</release>
<release version="3.8-beta4" date="2011-08-26">
<action dev="poi-developers" type="fix">51678 - Extracting text from Bug51524.zip is slow</action>
System.arraycopy(source,start+8,_data,0,len-8);
}
+ public boolean isCompressed() {
+ return LittleEndian.getShort(_header, 0)!=0;
+ }
+
/**
* Gets the uncompressed length of the data.
*
* @return the uncompressed length of the data.
*/
public int getDataLength() {
- return LittleEndian.getInt(_data, 0);
+ if (isCompressed()) {
+ return LittleEndian.getInt(_data, 0);
+ } else {
+ return _data.length;
+ }
}
/**
* @return the data input stream.
*/
public InputStream getData() {
- InputStream compressedStream = new ByteArrayInputStream(_data, 4, _data.length);
- return new InflaterInputStream(compressedStream);
+ if (isCompressed()) {
+ InputStream compressedStream = new ByteArrayInputStream(_data, 4, _data.length);
+ return new InflaterInputStream(compressedStream);
+ } else {
+ return new ByteArrayInputStream(_data, 0, _data.length);
+ }
}
public byte[] getRawData() {