|
||||||||||
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.
Field Summary | |
---|---|
protected static int |
CHECKSUM_SIZE
Size of the image checksum calculated using MD5 algorithm. |
protected int |
offset
The offset to the picture in the stream |
Constructor Summary | |
---|---|
PictureData()
|
Method Summary | |
---|---|
static PictureData |
create(int type)
Create an instance of PictureData by type. |
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. |
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. |
protected abstract int |
getSignature()
Blip signature. |
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 |
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 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int CHECKSUM_SIZE
protected int offset
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.IOException
protected abstract int getSignature()
public 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.IOException
public 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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |