From 5c5bafacd293ce8d3538857704f5d77eb3b455e7 Mon Sep 17 00:00:00 2001 From: Nick Burch Date: Sun, 28 Jun 2015 18:51:50 +0000 Subject: [PATCH] Print mini stream information, and property entries git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1688037 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/poi/poifs/dev/POIFSHeaderDumper.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/java/org/apache/poi/poifs/dev/POIFSHeaderDumper.java b/src/java/org/apache/poi/poifs/dev/POIFSHeaderDumper.java index 98d912d49e..54ab231493 100644 --- a/src/java/org/apache/poi/poifs/dev/POIFSHeaderDumper.java +++ b/src/java/org/apache/poi/poifs/dev/POIFSHeaderDumper.java @@ -159,21 +159,28 @@ public class POIFSHeaderDumper { } public static void displayPropertiesSummary(PropertyTable properties) { + System.out.println("Mini Stream starts at " + properties.getRoot().getStartBlock()); + System.out.println(); + System.out.println("Properties and their block start:"); displayProperties(properties.getRoot(), ""); System.out.println(""); } public static void displayProperties(DirectoryProperty prop, String indent) { - indent = indent + " "; - System.out.println(prop.getName()); + String nextIndent = indent + " "; + System.out.println(indent + "-> " + prop.getName()); for (Property cp : prop) { if (cp instanceof DirectoryProperty) { - displayProperties((DirectoryProperty)cp, indent); + displayProperties((DirectoryProperty)cp, nextIndent); } else { - // TODO + System.out.println(nextIndent + "=> " + cp.getName()); + System.out.print(nextIndent + " " + cp.getSize() + " bytes in "); if (cp.shouldUseSmallBlocks()) { - + System.out.print("mini"); + } else { + System.out.print("main"); } + System.out.println(" stream, starts at " + cp.getStartBlock()); } } }