Package org.apache.poi.hssf.usermodel
Class HSSFObjectData
- java.lang.Object
-
- org.apache.poi.hssf.usermodel.HSSFShape
-
- org.apache.poi.hssf.usermodel.HSSFSimpleShape
-
- org.apache.poi.hssf.usermodel.HSSFPicture
-
- org.apache.poi.hssf.usermodel.HSSFObjectData
-
- All Implemented Interfaces:
ObjectData
,Picture
,Shape
,SimpleShape
public final class HSSFObjectData extends HSSFPicture implements ObjectData
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
-
Fields inherited from class org.apache.poi.hssf.usermodel.HSSFSimpleShape
OBJECT_TYPE_ARC, OBJECT_TYPE_COMBO_BOX, OBJECT_TYPE_COMMENT, OBJECT_TYPE_LINE, OBJECT_TYPE_MICROSOFT_OFFICE_DRAWING, OBJECT_TYPE_OVAL, OBJECT_TYPE_PICTURE, OBJECT_TYPE_RECTANGLE, WRAP_BY_POINTS, WRAP_NONE, WRAP_SQUARE
-
Fields inherited from class org.apache.poi.hssf.usermodel.HSSFShape
FILL__FILLCOLOR_DEFAULT, LINESTYLE__COLOR_DEFAULT, LINESTYLE_DASHDOTDOTSYS, LINESTYLE_DASHDOTGEL, LINESTYLE_DASHDOTSYS, LINESTYLE_DASHGEL, LINESTYLE_DASHSYS, LINESTYLE_DEFAULT, LINESTYLE_DOTGEL, LINESTYLE_DOTSYS, LINESTYLE_LONGDASHDOTDOTGEL, LINESTYLE_LONGDASHDOTGEL, LINESTYLE_LONGDASHGEL, LINESTYLE_NONE, LINESTYLE_SOLID, LINEWIDTH_DEFAULT, LINEWIDTH_ONE_PT, NO_FILL_DEFAULT, NO_FILLHITTEST_FALSE, NO_FILLHITTEST_TRUE
-
-
Constructor Summary
Constructors Constructor Description HSSFObjectData(EscherContainerRecord spContainer, ObjRecord objRecord, DirectoryEntry _root)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
afterRemove(HSSFPatriarch patriarch)
remove escher container from the patriarch.escherAggregate remove obj, textObj and note records if it's necessary in case of ShapeGroup remove all contained shapesprotected HSSFShape
cloneShape()
protected ObjRecord
createObjRecord()
protected EscherContainerRecord
createSpContainer()
protected EmbeddedObjectRefSubRecord
findObjectRecord()
Finds the EmbeddedObjectRefSubRecord, or throws an Exception if there wasn't oneDirectoryEntry
getDirectory()
Gets the object data.byte[]
getObjectData()
String
getOLE2ClassName()
boolean
hasDirectoryEntry()
-
Methods inherited from class org.apache.poi.hssf.usermodel.HSSFPicture
getClientAnchor, getFileName, getImageDimension, getPictureData, getPictureIndex, getPreferredSize, getPreferredSize, getPreferredSize, getSheet, resize, resize, resize, setFileName, setPictureIndex, setShapeType
-
Methods inherited from class org.apache.poi.hssf.usermodel.HSSFSimpleShape
createTextObjRecord, getShapeId, getShapeType, getString, getTextObjectRecord, getWrapText, setString, setWrapText
-
Methods inherited from class org.apache.poi.hssf.usermodel.HSSFShape
countOfAllChildren, getAnchor, getEscherContainer, getFillColor, getLineStyle, getLineStyleColor, getLineWidth, getObjRecord, getOptRecord, getParent, getPatriarch, getRotationDegree, getShapeName, isFlipHorizontal, isFlipVertical, isNoFill, setAnchor, setFillColor, setFillColor, setFlipHorizontal, setFlipVertical, setLineStyle, setLineStyleColor, setLineStyleColor, setLineWidth, setNoFill, setParent, setPatriarch, setPropertyValue, setRotationDegree
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.poi.ss.usermodel.ObjectData
getContentType, getFileName, getPictureData
-
Methods inherited from interface org.apache.poi.ss.usermodel.Shape
getAnchor, getParent, getShapeName, isNoFill, setFillColor, setLineStyleColor, setNoFill
-
Methods inherited from interface org.apache.poi.ss.usermodel.SimpleShape
getShapeId
-
-
-
-
Constructor Detail
-
HSSFObjectData
public HSSFObjectData(EscherContainerRecord spContainer, ObjRecord objRecord, DirectoryEntry _root)
-
-
Method Detail
-
getOLE2ClassName
public String getOLE2ClassName()
- Specified by:
getOLE2ClassName
in interfaceObjectData
- Returns:
- the OLE2 Class Name of the object
-
getDirectory
public DirectoryEntry getDirectory() throws IOException
Description copied from interface:ObjectData
Gets the object data. Only call for ones that have data though. SeeObjectData.hasDirectoryEntry()
. The caller has to close the corresponding POIFSFileSystem- Specified by:
getDirectory
in interfaceObjectData
- Returns:
- the object data as an OLE2 directory.
- Throws:
IOException
- if there was an error reading the data.
-
getObjectData
public byte[] getObjectData()
- Specified by:
getObjectData
in interfaceObjectData
- Returns:
- the data portion, for an ObjectData that doesn't have an associated POIFS Directory Entry
-
hasDirectoryEntry
public boolean hasDirectoryEntry()
- Specified by:
hasDirectoryEntry
in interfaceObjectData
- Returns:
- does this ObjectData have an associated POIFS Directory Entry? (Not all do, those that don't have a data portion)
-
findObjectRecord
protected EmbeddedObjectRefSubRecord findObjectRecord()
Finds the EmbeddedObjectRefSubRecord, or throws an Exception if there wasn't one
-
createSpContainer
protected EscherContainerRecord createSpContainer()
- Overrides:
createSpContainer
in classHSSFPicture
-
createObjRecord
protected ObjRecord createObjRecord()
- Overrides:
createObjRecord
in classHSSFSimpleShape
-
afterRemove
protected void afterRemove(HSSFPatriarch patriarch)
Description copied from class:HSSFShape
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- Overrides:
afterRemove
in classHSSFSimpleShape
-
cloneShape
protected HSSFShape cloneShape()
- Overrides:
cloneShape
in classHSSFPicture
-
-