Top Description Fields Constructors Methods
org.apache.poi.hssf.usermodel

public final Class HSSFObjectData

extends HSSFPicture
implements ObjectData
Class Inheritance
All Implemented Interfaces
org.apache.poi.ss.usermodel.ObjectData, org.apache.poi.ss.usermodel.SimpleShape, org.apache.poi.ss.usermodel.Shape
Imports
java.io.IOException, org.apache.poi.ddf.*, org.apache.poi.hssf.record.*, org.apache.poi.poifs.filesystem.DirectoryEntry, .Entry, org.apache.poi.ss.usermodel.ObjectData, org.apache.poi.util.HexDump

Represents binary object (i.e. OLE) data stored in the file. Eg. A GIF, JPEG etc...

Right now, 13, july, 2012 can not be created from scratch

Field Summary

Modifier and TypeField and Description
private final DirectoryEntry
_root

Reference to the filesystem root, required for retrieving the object data.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv void
protected void
afterRemove(HSSFPatriarch patriarch)

Overrides org.apache.poi.hssf.usermodel.HSSFSimpleShape.afterRemove.

remove escher container from the patriarch.escherAggregate remove obj, textObj and note records if it's necessary in case of ShapeGroup remove all contained shapes

protected HSSFShape
protected ObjRecord
protected EscherContainerRecord
protected EmbeddedObjectRefSubRecord
findObjectRecord()

Finds the EmbeddedObjectRefSubRecord, or throws an Exception if there wasn't one

public DirectoryEntry
public byte[]
public String
public boolean
Inherited from org.apache.poi.hssf.usermodel.HSSFPicture:
getClientAnchorgetFileNamegetImageDimensiongetPictureDatagetPictureIndexgetPreferredSizegetPreferredSizegetPreferredSizegetSheetresizeresizeresizesetFileNamesetPictureIndexsetShapeType

Field Detail

_rootback to summary
private final DirectoryEntry _root

Reference to the filesystem root, required for retrieving the object data.

Constructor Detail

HSSFObjectDataback to summary
public HSSFObjectData(EscherContainerRecord spContainer, ObjRecord objRecord, DirectoryEntry _root)

Method Detail

afterInsertback to summary
pack-priv void afterInsert(HSSFPatriarch patriarch)

Overrides org.apache.poi.hssf.usermodel.HSSFPicture.afterInsert.

Annotations
@Override
afterRemoveback to summary
protected void afterRemove(HSSFPatriarch patriarch)

Overrides org.apache.poi.hssf.usermodel.HSSFSimpleShape.afterRemove.

Doc from org.apache.poi.hssf.usermodel.HSSFShape.afterRemove.

remove escher container from the patriarch.escherAggregate remove obj, textObj and note records if it's necessary in case of ShapeGroup remove all contained shapes

Annotations
@Override
cloneShapeback to summary
protected HSSFShape cloneShape()

Overrides org.apache.poi.hssf.usermodel.HSSFPicture.cloneShape.

Annotations
@Override
createObjRecordback to summary
protected ObjRecord createObjRecord()

Overrides org.apache.poi.hssf.usermodel.HSSFSimpleShape.createObjRecord.

Annotations
@Override
createSpContainerback to summary
protected EscherContainerRecord createSpContainer()

Overrides org.apache.poi.hssf.usermodel.HSSFPicture.createSpContainer.

Annotations
@Override
findObjectRecordback to summary
protected EmbeddedObjectRefSubRecord findObjectRecord()

Finds the EmbeddedObjectRefSubRecord, or throws an Exception if there wasn't one

getDirectoryback to summary
public DirectoryEntry getDirectory() throws IOException

Implements org.apache.poi.ss.usermodel.ObjectData.getDirectory.

Doc from org.apache.poi.ss.usermodel.ObjectData.getDirectory.

Gets the object data. Only call for ones that have data though. See hasDirectoryEntry(). The caller has to close the corresponding POIFSFileSystem

Returns:DirectoryEntry

the object data as an OLE2 directory.

Annotations
@Override
Exceptions
IOException:
if there was an error reading the data.
getObjectDataback to summary
public byte[] getObjectData()

Implements org.apache.poi.ss.usermodel.ObjectData.getObjectData.

Returns:byte[]

Doc from org.apache.poi.ss.usermodel.ObjectData.getObjectData.

the data portion, for an ObjectData that doesn't have an associated POIFS Directory Entry

Annotations
@Override
getOLE2ClassNameback to summary
public String getOLE2ClassName()

Implements org.apache.poi.ss.usermodel.ObjectData.getOLE2ClassName.

Returns:String

Doc from org.apache.poi.ss.usermodel.ObjectData.getOLE2ClassName.

the OLE2 Class Name of the object

Annotations
@Override
hasDirectoryEntryback to summary
public boolean hasDirectoryEntry()

Implements org.apache.poi.ss.usermodel.ObjectData.hasDirectoryEntry.

Returns:boolean

Doc from org.apache.poi.ss.usermodel.ObjectData.hasDirectoryEntry.

does this ObjectData have an associated POIFS Directory Entry? (Not all do, those that don't have a data portion)

Annotations
@Override