aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2016-12-11 20:58:30 +0000
committerDominik Stadler <centic@apache.org>2016-12-11 20:58:30 +0000
commitedca6e17ff1a9077be7678a1ccffeb34b5f4572f (patch)
treee51b0aadb71da6857b4305aad0f126f758f3d51e /src
parent395775e2938827af4b98c512650dd8f856ef7170 (diff)
downloadpoi-edca6e17ff1a9077be7678a1ccffeb34b5f4572f.tar.gz
poi-edca6e17ff1a9077be7678a1ccffeb34b5f4572f.zip
Add more output to BiffViewer for local debugging
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1773639 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/java/org/apache/poi/hssf/dev/BiffViewer.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/java/org/apache/poi/hssf/dev/BiffViewer.java b/src/java/org/apache/poi/hssf/dev/BiffViewer.java
index 5465f0ff10..8f2de9fe0b 100644
--- a/src/java/org/apache/poi/hssf/dev/BiffViewer.java
+++ b/src/java/org/apache/poi/hssf/dev/BiffViewer.java
@@ -29,6 +29,7 @@ import java.io.PrintWriter;
import java.io.Writer;
import java.nio.charset.Charset;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
import org.apache.poi.hssf.record.ArrayRecord;
@@ -245,6 +246,11 @@ public final class BiffViewer {
}
Record record;
if (dumpInterpretedRecords) {
+ ps.println();
+ ps.println("Remainging: " + recStream.remaining());
+ byte[] data = ((BiffDumpingStream)is).getData();
+ ps.println("Record-Data: " + HexDump.toHex(Arrays.copyOfRange(data, 0, Math.min(100, data.length))));
+
record = createRecord (recStream);
if (record.getSid() == ContinueRecord.sid) {
continue;
@@ -749,6 +755,10 @@ public final class BiffViewer {
public void close() throws IOException {
_is.close();
}
+
+ public byte[] getData() {
+ return _data;
+ }
}
private static final int DUMP_LINE_LEN = 16;