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
This commit is contained in:
parent
2ca2f0fba6
commit
b2b021bc32
@ -11,6 +11,7 @@
|
|||||||
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
|
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
|
||||||
</listAttribute>
|
</listAttribute>
|
||||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.apache.poi.hssf.dev.BiffViewer"/>
|
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.apache.poi.hssf.dev.BiffViewer"/>
|
||||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="/tmp/45312.xls"/>
|
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="--escher test-data/spreadsheet/57456.xls"/>
|
||||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="ApachePOI"/>
|
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="ApachePOI"/>
|
||||||
|
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-javaagent:/opt/file-leak-detector/target/file-leak-detector-1.9-SNAPSHOT-jar-with-dependencies.jar=http=19998,strong,excludes=file-leak-detector.exclude,dumpatshutdown"/>
|
||||||
</launchConfiguration>
|
</launchConfiguration>
|
||||||
|
@ -29,6 +29,7 @@ import java.io.PrintWriter;
|
|||||||
import java.io.Writer;
|
import java.io.Writer;
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.poi.hssf.record.ArrayRecord;
|
import org.apache.poi.hssf.record.ArrayRecord;
|
||||||
@ -245,6 +246,11 @@ public final class BiffViewer {
|
|||||||
}
|
}
|
||||||
Record record;
|
Record record;
|
||||||
if (dumpInterpretedRecords) {
|
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);
|
record = createRecord (recStream);
|
||||||
if (record.getSid() == ContinueRecord.sid) {
|
if (record.getSid() == ContinueRecord.sid) {
|
||||||
continue;
|
continue;
|
||||||
@ -749,6 +755,10 @@ public final class BiffViewer {
|
|||||||
public void close() throws IOException {
|
public void close() throws IOException {
|
||||||
_is.close();
|
_is.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public byte[] getData() {
|
||||||
|
return _data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final int DUMP_LINE_LEN = 16;
|
private static final int DUMP_LINE_LEN = 16;
|
||||||
|
Loading…
Reference in New Issue
Block a user