org.apache.poi.hslf.dev
Class PPTXMLDump

java.lang.Object
  extended by org.apache.poi.hslf.dev.PPTXMLDump

public final class PPTXMLDump
extends java.lang.Object

Utility class which dumps raw contents of a ppt file into XML format

Author:
Yegor Kozlov

Field Summary
static java.lang.String CR
           
protected  byte[] docstream
           
static int HEADER_SIZE
           
protected  boolean hexHeader
           
protected  java.io.Writer out
           
static int PICT_HEADER_SIZE
           
protected  byte[] pictstream
           
static java.lang.String PICTURES_ENTRY
           
static java.lang.String PPDOC_ENTRY
           
 
Constructor Summary
PPTXMLDump(java.io.File ppt)
           
 
Method Summary
 void dump(byte[] data, int offset, int length, int padding)
          Dump a part of the document stream into XML
 void dump(java.io.Writer out)
          Dump the structure of the supplied PPT file into XML
 void dumpPictures(byte[] data, int padding)
          Dumps the Pictures OLE stream into XML.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HEADER_SIZE

public static final int HEADER_SIZE
See Also:
Constant Field Values

PICT_HEADER_SIZE

public static final int PICT_HEADER_SIZE
See Also:
Constant Field Values

PPDOC_ENTRY

public static final java.lang.String PPDOC_ENTRY
See Also:
Constant Field Values

PICTURES_ENTRY

public static final java.lang.String PICTURES_ENTRY
See Also:
Constant Field Values

CR

public static java.lang.String CR

out

protected java.io.Writer out

docstream

protected byte[] docstream

pictstream

protected byte[] pictstream

hexHeader

protected boolean hexHeader
Constructor Detail

PPTXMLDump

public PPTXMLDump(java.io.File ppt)
           throws java.io.IOException
Throws:
java.io.IOException
Method Detail

dump

public void dump(java.io.Writer out)
          throws java.io.IOException
Dump the structure of the supplied PPT file into XML

Parameters:
out - Writer to write out
Throws:
java.io.IOException

dump

public void dump(byte[] data,
                 int offset,
                 int length,
                 int padding)
          throws java.io.IOException
Dump a part of the document stream into XML

Parameters:
data - PPT binary data
offset - offset from the beginning of the document
length - of the document
padding - used for formatting results
Throws:
java.io.IOException

dumpPictures

public void dumpPictures(byte[] data,
                         int padding)
                  throws java.io.IOException
Dumps the Pictures OLE stream into XML.

Parameters:
data - from the Pictures OLE data stream
padding -
Throws:
java.io.IOException

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception


Copyright 2012 The Apache Software Foundation or its licensors, as applicable.