import org.apache.poi.util.LittleEndian;\r
import org.apache.poi.util.POILogFactory;\r
import org.apache.poi.util.POILogger;\r
-import org.apache.poi.hslf.blip.Metafile;\r
\r
import java.awt.Dimension;\r
import java.awt.Rectangle;\r
return bytesAfterHeader + HEADER_SIZE;\r
}\r
\r
- private byte[] read(byte[] data, int pos) throws IOException {\r
- ByteArrayOutputStream out = new ByteArrayOutputStream();\r
- ByteArrayInputStream bis = new ByteArrayInputStream(data);\r
- Metafile.Header header = new Metafile.Header();\r
- header.read(data, pos);\r
- bis.skip(pos + header.getSize());\r
- InflaterInputStream inflater = new InflaterInputStream( bis );\r
- byte[] chunk = new byte[4096];\r
- int count;\r
- while ((count = inflater.read(chunk)) >=0 ) {\r
- out.write(chunk,0,count);\r
- }\r
- inflater.close();\r
- return out.toByteArray();\r
- }\r
-\r
/**\r
* Serializes the record to an existing byte array.\r
*\r
static String cwd = System.getProperty("HSSF.testdata.path");\r
\r
public void testPictures() throws IOException {\r
- FileInputStream is = new FileInputStream(new File(cwd, "SimpleWithImages-win.xls"));\r
+ FileInputStream is = new FileInputStream(new File(cwd, "SimpleWithImages.xls"));\r
HSSFWorkbook wb = new HSSFWorkbook(is);\r
is.close();\r
\r