Hi.

I have an OLE file, which has a number of entries below the root. When
I put this file through POIFSViewer, one of the entries looks like
this:

CompObj
 Property: "CompObj"
  Name          = "CompObj"
  Property Type = 2
  Node Color    = 1
  Time 1        = 0
  Time 2        = 0
 Document: "CompObj" size = 69
  00000000 01 00 FE FF 03 0A 00 00 FF FF FF FF 21 72 5C 56 ............!r\V
  00000010 BC 85 D1 11 89 D0 00 80 29 E4 B0 B1 0D 00 00 00 ........).......
  00000020 50 72 E4 73 65 6E 74 61 74 69 6F 6E 00 10 00 00 Pr.sentation....
  00000030 00 53 74 61 72 49 6D 70 72 65 73 73 20 35 2E 30 .StarImpress 5.0
  00000040 00 00 00 00 00                                  .....

(note that all occurrences of CompObj, actually contain a control
character at the beginning).

Now the question is: how to get that array. The following doesn't seem
to work, the returned array seems to have no relation to what I see on
that listing. (interestingly, what I see on that listing is also
different from what I see in the hex editor, though the string I'm
looking for is visible in both).

Entry e = root.getEntry("\u0001CompObj");
DocumentNode dn = (DocumentNode)e;
Object o = dn.getViewableIterator().next();
DocumentProperty dp = (DocumentProperty)o;
ByteArrayOutputStream baos = new ByteArrayOutputStream();
dp.writeData(baos);
return baos.toByteArray();

What am I doing wrong? How to get the content of Document:
"\u0001CompObj" inside my app.

-- 
Antoni Myłka
[email protected]

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to