public class Ole10Native
extends java.lang.Object
Ole10Native objects come in different shapes:
Modifier and Type | Field and Description |
---|---|
static java.lang.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(java.lang.String label, java.lang.String filename, java.lang.String command, byte[] data)
Creates an instance and fills the fields based on ...
|
Modifier and Type | Method and Description |
---|---|
static Ole10Native |
createFromEmbeddedOleObject(DirectoryNode directory)
Creates an instance of this class from an embedded OLE Object.
(从嵌入的 OLE 对象创建此类的实例。)
|
static Ole10Native |
createFromEmbeddedOleObject(POIFSFileSystem poifs)
Creates an instance of this class from an embedded OLE Object.
(从嵌入的 OLE 对象创建此类的实例。)
|
static void |
createOleMarkerEntry(DirectoryEntry parent)
Add the \1OLE marker entry, which is not the Ole10Native entry.
(添加 1OLE 标记条目,它不是 Ole10Native 条目。)
|
static void |
createOleMarkerEntry(POIFSFileSystem poifs)
Add the \1OLE marker entry, which is not the Ole10Native entry.
(添加 1OLE 标记条目,它不是 Ole10Native 条目。)
|
java.lang.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.
(返回命令字段 - 通常是嵌入文件的名称,包括完整路径,可能是嵌入文件期间指定的命令。)
|
java.lang.String |
getCommand2()
Get Command string of UTF16 extended OLE packages or
null if not set or not UTF16 extended
(获取 UTF16 扩展 OLE 包的命令字符串,如果未设置或未设置 UTF16 扩展,则为 null)
|
byte[] |
getDataBuffer()
Returns the buffer containing the embedded file's data, or
null if no data was embedded.
(返回包含嵌入文件数据的缓冲区,如果没有嵌入数据,则返回 null。)
|
int |
getDataSize()
Returns the size of the embedded file.
(返回嵌入文件的大小。)
|
java.lang.String |
getFileName()
Returns the fileName field - usually the name of the file being embedded including the full path.
(返回 fileName 字段 - 通常是嵌入文件的名称,包括完整路径。)
|
java.lang.String |
getFileName2()
Get filename string for UTF16 extended OLE packages or
null if not set or not UTF16 extended
(获取 UTF16 扩展 OLE 包的文件名字符串,如果未设置或未设置 UTF16 扩展,则为 null)
|
short |
getFlags1()
Returns flags1 - currently unknown - usually 0x0002.
(返回 flags1 - 当前未知 - 通常为 0x0002。)
|
short |
getFlags2()
Returns flags2 - currently unknown - mostly 0x0000.
(返回 flags2 - 目前未知 - 主要是 0x0000。)
|
java.lang.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.
(返回标签字段 - 通常是文件的名称(不包括目录),但可能是在打包/嵌入数据期间指定的任何名称。)
|
java.lang.String |
getLabel2()
Get Label string for UTF16 extended OLE packages or
null if not set or not UTF16 extended
(获取 UTF16 扩展 OLE 包的标签字符串,如果未设置或未设置 UTF16 扩展,则为 null)
|
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).
(返回 totalSize 字段的值 - 结构的总长度为 totalSize + 4(此字段的值 + 此字段的大小)。)
|
short |
getUnknown1()
Returns unknown1 field - currently unknown.
(返回 unknown1 字段 - 当前未知。)
|
void |
setCommand(java.lang.String command) |
void |
setCommand2(java.lang.String command2)
Set Command string for UTF16 extended OLE packages or
null if not set or not UTF16 extended
(设置 UTF16 扩展 OLE 包的命令字符串,如果未设置或未设置 UTF16 扩展,则为 null)
|
void |
setDataBuffer(byte[] dataBuffer) |
void |
setFileName(java.lang.String fileName) |
void |
setFileName2(java.lang.String fileName2)
Set filename string for UTF16 extended OLE packages or
null if not set or not UTF16 extended
(为 UTF16 扩展 OLE 包设置文件名字符串,如果未设置或未设置 UTF16 扩展,则为 null)
|
void |
setFlags1(short flags1) |
void |
setFlags2(short flags2) |
void |
setLabel(java.lang.String label) |
void |
setLabel2(java.lang.String label2)
Set Label string for UTF16 extended OLE packages or
null if not set or not UTF16 extended
(为 UTF16 扩展 OLE 包设置标签字符串,如果未设置或未设置 UTF16 扩展,则为 null)
|
void |
setUnknown1(short unknown1) |
void |
writeOut(java.io.OutputStream out)
Have the contents printer out into an OutputStream, used when writing a file back out to disk (Normally, atom classes will keep their bytes around, but non atom classes will just request the bytes from their children, then chuck on their header and return)
(将内容打印机输出到 OutputStream 中,在将文件写回磁盘时使用(通常,原子类将保留它们的字节,但非原子类只会从它们的子类请求字节,然后夹在它们的标题上并返回))
|
public static final java.lang.String OLE10_NATIVE
public Ole10Native(java.lang.String label, java.lang.String filename, java.lang.String command, byte[] data)
public Ole10Native(byte[] data, int offset) throws Ole10NativeException
data
- The buffer containing the Ole10Native record
(data - 包含 Ole10Native 记录的缓冲区)
offset
- The start offset of the record in the buffer
(offset - 缓冲区中记录的起始偏移量)
Ole10NativeException
- on invalid or unexcepted data format
(Ole10NativeException - 无效或未例外的数据格式)
public static Ole10Native createFromEmbeddedOleObject(POIFSFileSystem poifs) throws java.io.IOException, Ole10NativeException
poifs
- POI Filesystem object
(poifs - POI 文件系统对象)
java.io.IOException
- on IO error
(java.io.IOException - IO 错误)
Ole10NativeException
- on invalid or unexcepted data format
(Ole10NativeException - 无效或未例外的数据格式)
public static Ole10Native createFromEmbeddedOleObject(DirectoryNode directory) throws java.io.IOException, Ole10NativeException
directory
- POI Filesystem object
(目录 - POI 文件系统对象)
java.io.IOException
- on IO error
(java.io.IOException - IO 错误)
Ole10NativeException
- on invalid or unexcepted data format
(Ole10NativeException - 无效或未例外的数据格式)
public static void createOleMarkerEntry(DirectoryEntry parent) throws java.io.IOException
java.io.IOException
(java.io.IOException)
public static void createOleMarkerEntry(POIFSFileSystem poifs) throws java.io.IOException
java.io.IOException
(java.io.IOException)
public int getTotalSize()
public short getFlags1()
public java.lang.String getLabel()
public java.lang.String getFileName()
public short getFlags2()
public short getUnknown1()
public java.lang.String getCommand()
public int getDataSize()
getDataBuffer()
returns
null
.
(返回嵌入文件的大小。如果大小为 0(零),则没有嵌入数据。为确保没有嵌入数据,请检查 getDataBuffer() 是否返回 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
.)
(返回包含嵌入文件数据的缓冲区,如果没有嵌入数据,则返回 null。请注意,嵌入可能会提供有关数据的信息,但不包括实际数据。 (因此标签、文件名等可用,但此方法返回 null。))
public void writeOut(java.io.OutputStream out) throws java.io.IOException
java.io.IOException
(java.io.IOException)
public void setFlags1(short flags1)
public void setFlags2(short flags2)
public void setLabel(java.lang.String label)
public void setFileName(java.lang.String fileName)
public void setCommand(java.lang.String command)
public void setUnknown1(short unknown1)
public void setDataBuffer(byte[] dataBuffer)
public java.lang.String getCommand2()
null
if not set or not UTF16 extended
(获取 UTF16 扩展 OLE 包的命令字符串,如果未设置或未设置 UTF16 扩展,则为 null)
public void setCommand2(java.lang.String command2)
null
if not set or not UTF16 extended
(设置 UTF16 扩展 OLE 包的命令字符串,如果未设置或未设置 UTF16 扩展,则为 null)
public java.lang.String getLabel2()
null
if not set or not UTF16 extended
(获取 UTF16 扩展 OLE 包的标签字符串,如果未设置或未设置 UTF16 扩展,则为 null)
public void setLabel2(java.lang.String label2)
null
if not set or not UTF16 extended
(为 UTF16 扩展 OLE 包设置标签字符串,如果未设置或未设置 UTF16 扩展,则为 null)
public java.lang.String getFileName2()
null
if not set or not UTF16 extended
(获取 UTF16 扩展 OLE 包的文件名字符串,如果未设置或未设置 UTF16 扩展,则为 null)
public void setFileName2(java.lang.String fileName2)
null
if not set or not UTF16 extended
(为 UTF16 扩展 OLE 包设置文件名字符串,如果未设置或未设置 UTF16 扩展,则为 null)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.