|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.poi.poifs.filesystem.Ole10Native
public class Ole10Native
Represents an Ole10Native record which is wrapped around certain binary files being embedded in OLE2 documents.
Field Summary | |
---|---|
protected static java.lang.String |
ISO1
|
static java.lang.String |
OLE10_NATIVE
|
Constructor Summary | |
---|---|
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 ... |
Method Summary | |
---|---|
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. |
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. |
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. |
java.lang.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. |
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. |
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). |
short |
getUnknown1()
Returns unknown1 field - currently unknown. |
void |
setCommand(java.lang.String command)
|
void |
setDataBuffer(byte[] dataBuffer)
|
void |
setFileName(java.lang.String fileName)
|
void |
setFlags1(short flags1)
|
void |
setFlags2(short flags2)
|
void |
setFlags3(short flags3)
|
void |
setLabel(java.lang.String label)
|
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) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String OLE10_NATIVE
protected static final java.lang.String ISO1
Constructor Detail |
---|
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 recordoffset
- The start offset of the record in the buffer
Ole10NativeException
- on invalid or unexcepted data formatMethod Detail |
---|
public static Ole10Native createFromEmbeddedOleObject(POIFSFileSystem poifs) throws java.io.IOException, Ole10NativeException
poifs
- POI Filesystem object
java.io.IOException
- on IO error
Ole10NativeException
- on invalid or unexcepted data formatpublic static Ole10Native createFromEmbeddedOleObject(DirectoryNode directory) throws java.io.IOException, Ole10NativeException
directory
- POI Filesystem object
java.io.IOException
- on IO error
Ole10NativeException
- on invalid or unexcepted data formatpublic 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
.
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()
public void writeOut(java.io.OutputStream out) throws java.io.IOException
java.io.IOException
public void setFlags1(short flags1)
public void setFlags2(short flags2)
public void setFlags3(short flags3)
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)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |