Package org.apache.poi.hssf.usermodel
Class HSSFPictureData
java.lang.Object
org.apache.poi.hssf.usermodel.HSSFPictureData
- All Implemented Interfaces:
PictureData
Represents binary data stored in the file. Eg. A GIF, JPEG etc...
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final short -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]getData()Gets the picture data.intReturns the mime type for the imageintSuggests a file extension for this image.
-
Field Details
-
MSOBI_WMF
public static final short MSOBI_WMF- See Also:
-
MSOBI_EMF
public static final short MSOBI_EMF- See Also:
-
MSOBI_PICT
public static final short MSOBI_PICT- See Also:
-
MSOBI_PNG
public static final short MSOBI_PNG- See Also:
-
MSOBI_JPEG
public static final short MSOBI_JPEG- See Also:
-
MSOBI_DIB
public static final short MSOBI_DIB- See Also:
-
FORMAT_MASK
public static final short FORMAT_MASK- See Also:
-
-
Constructor Details
-
HSSFPictureData
Constructs a picture object.- Parameters:
blip- the underlying blip record containing the bitmap data.
-
-
Method Details
-
getData
public byte[] getData()Description copied from interface:PictureDataGets the picture data.- Specified by:
getDatain interfacePictureData- Returns:
- the picture data.
-
getFormat
public int getFormat()- Returns:
- format of the picture.
- See Also:
-
suggestFileExtension
Description copied from interface:PictureDataSuggests a file extension for this image.- Specified by:
suggestFileExtensionin interfacePictureData- Returns:
- 'wmf', 'jpeg' etc depending on the format. never
null - See Also:
-
getMimeType
Returns the mime type for the image- Specified by:
getMimeTypein interfacePictureData
-
getPictureType
public int getPictureType()- Specified by:
getPictureTypein interfacePictureData- Returns:
- the POI internal image type, -1 if not unknown image type
- See Also:
-