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
This commit is contained in:
Andreas Beeker 2018-12-28 23:42:57 +00:00
parent 83d4d4169f
commit a78bd71fc1

View File

@ -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