From: Andreas Beeker Date: Fri, 28 Dec 2018 23:42:57 +0000 (+0000) Subject: Add Enum method to help identifying unknown records with POI-Visualizer X-Git-Tag: REL_4_1_0~140 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a78bd71fc1f3bd60af434774744b5dfacfced403;p=poi.git Add Enum method to help identifying unknown records with POI-Visualizer git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1849897 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/UnknownRecordPlaceholder.java b/src/scratchpad/src/org/apache/poi/hslf/record/UnknownRecordPlaceholder.java index db928f29ac..4790ae1ee6 100644 --- a/src/scratchpad/src/org/apache/poi/hslf/record/UnknownRecordPlaceholder.java +++ b/src/scratchpad/src/org/apache/poi/hslf/record/UnknownRecordPlaceholder.java @@ -17,11 +17,12 @@ package org.apache.poi.hslf.record; -import org.apache.poi.util.IOUtils; -import org.apache.poi.util.LittleEndian; import java.io.IOException; import java.io.OutputStream; +import org.apache.poi.util.IOUtils; +import org.apache.poi.util.LittleEndian; + /** * If we come across a record we don't know about, we create one of * these. It allows us to keep track of what it contains, so we can @@ -30,6 +31,7 @@ import java.io.OutputStream; * @author Nick Burch */ +@SuppressWarnings("unused") public final class UnknownRecordPlaceholder extends RecordAtom { @@ -56,7 +58,16 @@ public final class UnknownRecordPlaceholder extends RecordAtom /** * Return the value we were given at creation */ - public long getRecordType() { return _type; } + public long getRecordType() { + return _type; + } + + /** + * Return the value as enum we were given at creation + */ + public RecordTypes getRecordTypeEnum() { + return RecordTypes.forTypeID((int)_type); + } /** * Write the contents of the record back, so it can be written