Example usage for org.apache.poi.poifs.dev POIFSViewEngine inspectViewable

List of usage examples for org.apache.poi.poifs.dev POIFSViewEngine inspectViewable

Introduction

In this page you can find the example usage for org.apache.poi.poifs.dev POIFSViewEngine inspectViewable.

Prototype


public static List<String> inspectViewable(final Object viewable, final boolean drilldown,
        final int indentLevel, final String indentString) 

Source Link

Document

Inspect an object that may be viewable, and drill down if told to

Usage

From source file:org.docx4j.openpackaging.parts.WordprocessingML.OleObjectBinaryPart.java

License:Apache License

/**
 * @param os//from  w  w w  .  ja v  a  2 s.c om
 * @param verbose
 * @throws IOException
 * @since 3.0.0
 */
public void viewFile(OutputStream os, boolean verbose) throws IOException {
    String indent = "";
    boolean withSizes = true;
    displayDirectory(getFs().getRoot(), os, indent, withSizes);

    if (verbose) {
        List strings = POIFSViewEngine.inspectViewable(fs, true, 0, "  ");
        Iterator iter = strings.iterator();

        while (iter.hasNext()) {
            os.write(((String) iter.next()).getBytes());
        }
    }
}