public class Ole10Native extends Object
Modifier and Type | Field and Description |
---|---|
static String |
OLE10_NATIVE |
Constructor and Description |
---|
Ole10Native(byte[] data,
int offset)
Creates an instance and fills the fields based on the data in the given buffer.
|
Ole10Native(byte[] data,
int offset,
boolean plain)
Creates an instance and fills the fields based on the data in the given buffer.
|
Modifier and Type | Method and Description |
---|---|
static Ole10Native |
createFromEmbeddedOleObject(DirectoryNode directory)
Creates an instance of this class from an embedded OLE Object.
|
static Ole10Native |
createFromEmbeddedOleObject(POIFSFileSystem poifs)
Creates an instance of this class from an embedded OLE Object.
|
String |
getCommand()
Returns the command field - usually the name of the file being embedded
including the full path, may be a command specified during embedding the file.
|
byte[] |
getDataBuffer()
Returns the buffer containing the embedded file's data, or
null
if no data was embedded. |
int |
getDataSize()
Returns the size of the embedded file.
|
String |
getFileName()
Returns the fileName field - usually the name of the file being embedded
including the full path.
|
short |
getFlags1()
Returns flags1 - currently unknown - usually 0x0002.
|
short |
getFlags2()
Returns flags2 - currently unknown - mostly 0x0000.
|
short |
getFlags3()
Returns the flags3 - currently unknown.
|
String |
getLabel()
Returns the label field - usually the name of the file (without directory) but
probably may be any name specified during packaging/embedding the data.
|
int |
getTotalSize()
Returns the value of the totalSize field - the total length of the structure
is totalSize + 4 (value of this field + size of this field).
|
byte[] |
getUnknown1()
Returns unknown1 field - currently unknown.
|
byte[] |
getUnknown2()
Returns the unknown2 field - currently being a byte[3] - mostly {0, 0, 0}.
|
public static final String OLE10_NATIVE
public Ole10Native(byte[] data, int offset) throws Ole10NativeException
data
- The buffer containing the Ole10Native recordoffset
- The start offset of the record in the bufferOle10NativeException
- on invalid or unexcepted data formatpublic Ole10Native(byte[] data, int offset, boolean plain) throws Ole10NativeException
data
- The buffer containing the Ole10Native recordoffset
- The start offset of the record in the bufferplain
- Specified 'plain' format without filenameOle10NativeException
- on invalid or unexcepted data formatpublic static Ole10Native createFromEmbeddedOleObject(POIFSFileSystem poifs) throws IOException, Ole10NativeException
poifs
- POI Filesystem objectIOException
- on IO errorOle10NativeException
- on invalid or unexcepted data formatpublic static Ole10Native createFromEmbeddedOleObject(DirectoryNode directory) throws IOException, Ole10NativeException
directory
- POI Filesystem objectIOException
- on IO errorOle10NativeException
- on invalid or unexcepted data formatpublic int getTotalSize()
public short getFlags1()
public String getLabel()
public String getFileName()
public short getFlags2()
public byte[] getUnknown1()
public byte[] getUnknown2()
public String getCommand()
public int getDataSize()
getDataBuffer()
returns null
.public byte[] getDataBuffer()
null
if no data was embedded. Note that an embedding may provide information about
the data, but the actual data is not included. (So label, filename etc. are
available, but this method returns null
.)public short getFlags3()
Copyright © 2020. All rights reserved.