|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.poi.hslf.usermodel.PictureData
public abstract class PictureData
A class that represents image data contained in a slide show.
| Constructor Summary | |
|---|---|
PictureData()
|
|
| Method Summary | |
|---|---|
static PictureData |
create(int type)
Create an instance of PictureData by type. |
void |
draw(java.awt.Graphics2D graphics,
Picture parent)
|
static byte[] |
getChecksum(byte[] data)
Compute 16-byte checksum of this picture using MD5 algorithm. |
abstract byte[] |
getData()
Returns the binary data of this Picture |
byte[] |
getHeader()
Return 24 byte header which preceeds the actual picture data. |
static ImagePainter |
getImagePainter(int type)
Return ImagePainter for the specified image type |
int |
getOffset()
File offset in the 'Pictures' stream |
byte[] |
getRawData()
Returns the raw binary data of this Picture excluding the first 8 bytes which hold image signature and size of the image data. |
int |
getSize()
Deprecated. Use getData().length instead. |
abstract int |
getType()
Returns type of this picture. |
byte[] |
getUID()
Returns 16-byte checksum of this picture |
abstract void |
setData(byte[] data)
Set picture data |
static void |
setImagePainter(int type,
ImagePainter painter)
Register ImagePainter for the specified image type |
void |
setOffset(int offset)
Set offset of this picture in the 'Pictures' stream. |
void |
setRawData(byte[] data)
|
void |
write(java.io.OutputStream out)
Write this picture into OutputStream |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PictureData()
| Method Detail |
|---|
public abstract int getType()
Picture class.
- Returns:
- type of this picture.
public abstract byte[] getData()
public abstract void setData(byte[] data)
throws java.io.IOException
java.io.IOExceptionpublic byte[] getRawData()
public void setRawData(byte[] data)
public int getOffset()
public void setOffset(int offset)
offset - in the 'Pictures' streampublic byte[] getUID()
public static byte[] getChecksum(byte[] data)
public void write(java.io.OutputStream out)
throws java.io.IOException
OutputStream
java.io.IOExceptionpublic static PictureData create(int type)
PictureData by type.
type - type of the picture data.
Must be one of the static constants defined in the Picture class.
- Returns:
- concrete instance of
PictureData public byte[] getHeader()
The header consists of 2-byte signature, 2-byte type, 4-byte image size and 16-byte checksum of the image data.
public int getSize()
getData().length instead.
public void draw(java.awt.Graphics2D graphics,
Picture parent)
public static void setImagePainter(int type,
ImagePainter painter)
type - image type, must be one of the static constants defined in the Picture class.painter - public static ImagePainter getImagePainter(int type)
type - blip type, must be one of the static constants defined in the Picture class.
- Returns:
- ImagePainter for the specified image type
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||