|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.poi.hslf.usermodel.HSLFPictureData
public abstract class HSLFPictureData
A class that represents image data contained in a slide show.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.poi.sl.usermodel.PictureData |
---|
PictureData.PictureType |
Field Summary | |
---|---|
protected static int |
CHECKSUM_SIZE
Size of the image checksum calculated using MD5 algorithm. |
Constructor Summary | |
---|---|
HSLFPictureData()
|
Method Summary | |
---|---|
static HSLFPictureData |
create(PictureData.PictureType type)
Create an instance of PictureData by type. |
byte[] |
getChecksum()
Gets the checksum - the checksum can be of various length - mostly it's 8 (XSLF) or 16 (HSLF) bytes long. |
static byte[] |
getChecksum(byte[] data)
Compute 16-byte checksum of this picture using MD5 algorithm. |
java.lang.String |
getContentType()
Returns content type (mime type) of this picture. |
byte[] |
getHeader()
Return 24 byte header which preceeds the actual picture data. |
java.awt.Dimension |
getImageDimensionInPixels()
Return the original image dimensions in pixels |
int |
getIndex()
|
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. |
byte[] |
getUID()
Returns 16-byte checksum of this picture |
protected int |
getUIDInstanceCount()
The instance type/signatures defines if one or two UID instances will be included |
void |
setIndex(int index)
|
void |
setOffset(int offset)
Set offset of this picture in the 'Pictures' stream. |
void |
setRawData(byte[] data)
|
abstract void |
setSignature(int signature)
|
protected void |
setUIDInstanceCount(int uidInstanceCount)
The instance type/signatures defines if one or two UID instances will be included |
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 |
Methods inherited from interface org.apache.poi.sl.usermodel.PictureData |
---|
getData, getImageDimension, getType, setData |
Field Detail |
---|
protected static final int CHECKSUM_SIZE
Constructor Detail |
---|
public HSLFPictureData()
Method Detail |
---|
protected abstract int getSignature()
public abstract void setSignature(int signature)
protected int getUIDInstanceCount()
protected void setUIDInstanceCount(int uidInstanceCount)
uidInstanceCount
- the number of uid sequencespublic byte[] getRawData()
public void setRawData(byte[] data)
public int getOffset()
public void setOffset(int offset)
offset
- in the 'Pictures' streampublic byte[] getUID()
public byte[] getChecksum()
PictureData
getChecksum
in interface PictureData
public static byte[] getChecksum(byte[] data)
public void write(java.io.OutputStream out) throws java.io.IOException
OutputStream
java.io.IOException
public static HSLFPictureData create(PictureData.PictureType 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 getIndex()
public void setIndex(int index)
index
- sets the 1-based index of this pictures within the pictures streampublic final java.lang.String getContentType()
PictureData
getContentType
in interface PictureData
public java.awt.Dimension getImageDimensionInPixels()
PictureData
getImageDimensionInPixels
in interface PictureData
PictureData.getImageDimension()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |