Top Fields Constructors Methods
org.apache.poi.ddf

public final Class EscherMetafileBlip

extends EscherBlipRecord
Class Inheritance
Static Imports
org.apache.logging.log4j.util.Unbox.box

Field Summary

Modifier and TypeField and Description
private static final int
private final byte[]
private int
private final byte[]
field_2_UID

The primary UID is only saved to disk if (blip_instance ^ blip_signature == 1)

private int
private int
private int
private int
private int
private int
private int
private byte
private byte
private static final int
private static final Logger
private static int
private byte[]
public static final short
RECORD_ID_EMF

Deprecated use EscherRecordTypes.BLIP_EMF.typeID
public static final short
RECORD_ID_PICT

Deprecated use EscherRecordTypes.BLIP_PICT.typeID
public static final short
RECORD_ID_WMF

Deprecated use EscherRecordTypes.BLIP_WMF.typeID
private byte[]
Inherited from org.apache.poi.ddf.EscherBlipRecord:
RECORD_ID_ENDRECORD_ID_START

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public EscherMetafileBlip
public int
fillFields(byte[]
The byte array containing the serialized escher records.
data
,
int
The offset into the byte array.
offset
,
EscherRecordFactory
A factory for creating new escher records.
recordFactory
)

Overrides org.apache.poi.ddf.EscherBlipRecord.fillFields.

The contract of this method is to deserialize an escher record including its children.

public Rectangle

Returns:

the clipping region
getBounds
()

Get the clipping region of the metafile

public int

Returns:

the compressed size
getCompressedSize
()

Gets the compressed size of the metafile (in bytes)

public byte

Returns:

the filter byte
getFilter
()

Gets the filter byte - this is usually 0xFE

public Map<String, Supplier<?>>
public static int

Returns:

the max record length allowed for EscherMetafileBlip
getMaxRecordLength
()

Hides org.apache.poi.ddf.EscherBlipRecord.getMaxRecordLength.

public byte[]

Returns:

the second MD4
getPrimaryUID
()

Gets the second MD4, that specifies the unique identifier of the uncompressed blip data

public int
getRecordSize()

Overrides org.apache.poi.ddf.EscherBlipRecord.getRecordSize.

Subclasses should effeciently return the number of bytes required to serialize the record.

public byte[]

Returns:

any remaining bytes
getRemainingData
()

Returns any remaining bytes

public short

Returns:

the blip signature
getSignature
()

Return the blip signature

public Dimension

Returns:

the dimensions of the metafile
getSizeEMU
()

Gets the dimensions of the metafile

public byte[]

Returns:

the first MD4
getUID
()

Gets the first MD4, that specifies the unique identifier of the uncompressed blip data

public int

Returns:

the uncompressed size
getUncompressedSize
()

Gets the uncompressed size (in bytes)

private static byte[]

Returns:

the inflated picture data.
inflatePictureData
(byte[]
the deflated picture data.
data
)

Decompresses the provided data, returning the inflated result.

public boolean

Returns:

true, if the metafile is compressed
isCompressed
()

Gets the compression of the metafile

public int
serialize(int
the offset within the byte array
offset
,
byte[]
the data array to serialize to
data
,
EscherSerializationListener
a listener for begin and end serialization events. This is useful because the serialization is hierarchical/recursive and sometimes you need to be able break into that.
listener
)

Overrides org.apache.poi.ddf.EscherBlipRecord.serialize.

Serializes the record to an existing byte array.

public void
setBounds(Rectangle
the clipping region
bounds
)

Sets the clipping region

public void
setCompressed(boolean
the compression state, true if it's compressed
compressed
)

Sets the compression of the metafile

public void
setCompressedSize(int
the compressed size
compressedSize
)

Sets the compressed size of the metafile (in bytes)

public void
setFilter(byte
the filter byte
filter
)

Sets the filter byte - this is usually 0xFE

public static void
setMaxRecordLength(int
the max record length allowed for EscherMetafileBlip
length
)

Hides org.apache.poi.ddf.EscherBlipRecord.setMaxRecordLength.

public void
setPictureData(byte[]
the picture data
pictureData
)

Overrides org.apache.poi.ddf.EscherBlipRecord.setPictureData.

Sets the picture data bytes

public void
setPrimaryUID(byte[]
the second MD4
primaryUID
)

Sets the second MD4, that specifies the unique identifier of the uncompressed blip data

public void
setSizeEMU(Dimension
the dimensions of the metafile
sizeEMU
)

Gets the dimensions of the metafile

public void
setUID(byte[]
the first MD4
uid
)

Sets the first MD4, that specifies the unique identifier of the uncompressed blip data

public void
setUncompressedSize(int
the uncompressed size
uncompressedSize
)

Sets the uncompressed size (in bytes)

Inherited from org.apache.poi.ddf.EscherBlipRecord:
getGenericRecordTypegetPicturedatagetRecordNamesetPictureData

Field Detail

DEFAULT_MAX_RECORD_LENGTHback to summary
private static final int DEFAULT_MAX_RECORD_LENGTH

Hides org.apache.poi.ddf.EscherBlipRecord.DEFAULT_MAX_RECORD_LENGTH.

field_1_UIDback to summary
private final byte[] field_1_UID
field_2_cbback to summary
private int field_2_cb
field_2_UIDback to summary
private final byte[] field_2_UID

The primary UID is only saved to disk if (blip_instance ^ blip_signature == 1)

field_3_rcBounds_x1back to summary
private int field_3_rcBounds_x1
field_3_rcBounds_x2back to summary
private int field_3_rcBounds_x2
field_3_rcBounds_y1back to summary
private int field_3_rcBounds_y1
field_3_rcBounds_y2back to summary
private int field_3_rcBounds_y2
field_4_ptSize_hback to summary
private int field_4_ptSize_h
field_4_ptSize_wback to summary
private int field_4_ptSize_w
field_5_cbSaveback to summary
private int field_5_cbSave
field_6_fCompressionback to summary
private byte field_6_fCompression
field_7_fFilterback to summary
private byte field_7_fFilter
HEADER_SIZEback to summary
private static final int HEADER_SIZE

Hides org.apache.poi.ddf.EscherBlipRecord.HEADER_SIZE.

LOGGERback to summary
private static final Logger LOGGER
MAX_RECORD_LENGTHback to summary
private static int MAX_RECORD_LENGTH

Hides org.apache.poi.ddf.EscherBlipRecord.MAX_RECORD_LENGTH.

raw_pictureDataback to summary
private byte[] raw_pictureData
RECORD_ID_EMFback to summary
public static final short RECORD_ID_EMF

Deprecated

use EscherRecordTypes.BLIP_EMF.typeID

Annotations
@Deprecated
@Removal
version:5.3
RECORD_ID_PICTback to summary
public static final short RECORD_ID_PICT

Deprecated

use EscherRecordTypes.BLIP_PICT.typeID

Annotations
@Deprecated
@Removal
version:5.3
RECORD_ID_WMFback to summary
public static final short RECORD_ID_WMF

Deprecated

use EscherRecordTypes.BLIP_WMF.typeID

Annotations
@Deprecated
@Removal
version:5.3
remainingDataback to summary
private byte[] remainingData

Constructor Detail

EscherMetafileBlipback to summary
public EscherMetafileBlip()
EscherMetafileBlipback to summary
public EscherMetafileBlip(EscherMetafileBlip other)

Method Detail

copyback to summary
public EscherMetafileBlip copy()

Overrides org.apache.poi.ddf.EscherBlipRecord.copy.

Implements org.apache.poi.common.Duplicatable.copy.

Returns:EscherMetafileBlip

Doc from org.apache.poi.common.Duplicatable.copy.

a deep copy of the implementing class / instance

Annotations
@Override
fillFieldsback to summary
public int fillFields(byte[] data, int offset, EscherRecordFactory recordFactory)

Overrides org.apache.poi.ddf.EscherBlipRecord.fillFields.

Doc from org.apache.poi.ddf.EscherRecord.fillFields.

The contract of this method is to deserialize an escher record including its children.

Parameters
data:byte[]

The byte array containing the serialized escher records.

offset:int

The offset into the byte array.

recordFactory:EscherRecordFactory

A factory for creating new escher records.

Returns:int

The number of bytes written.

Annotations
@Override
getBoundsback to summary
public Rectangle getBounds()

Get the clipping region of the metafile

Returns:Rectangle

the clipping region

getCompressedSizeback to summary
public int getCompressedSize()

Gets the compressed size of the metafile (in bytes)

Returns:int

the compressed size

getFilterback to summary
public byte getFilter()

Gets the filter byte - this is usually 0xFE

Returns:byte

the filter byte

getGenericPropertiesback to summary
public Map<String, Supplier<?>> getGenericProperties()

Overrides org.apache.poi.ddf.EscherBlipRecord.getGenericProperties.

Implements org.apache.poi.common.usermodel.GenericRecord.getGenericProperties.

Annotations
@Override
getMaxRecordLengthback to summary
public static int getMaxRecordLength()

Hides org.apache.poi.ddf.EscherBlipRecord.getMaxRecordLength.

Returns:int

the max record length allowed for EscherMetafileBlip

getPrimaryUIDback to summary
public byte[] getPrimaryUID()

Gets the second MD4, that specifies the unique identifier of the uncompressed blip data

Returns:byte[]

the second MD4

getRecordSizeback to summary
public int getRecordSize()

Overrides org.apache.poi.ddf.EscherBlipRecord.getRecordSize.

Doc from org.apache.poi.ddf.EscherRecord.getRecordSize.

Subclasses should effeciently return the number of bytes required to serialize the record.

Returns:int

number of bytes

Annotations
@Override
getRemainingDataback to summary
public byte[] getRemainingData()

Returns any remaining bytes

Returns:byte[]

any remaining bytes

getSignatureback to summary
public short getSignature()

Return the blip signature

Returns:short

the blip signature

getSizeEMUback to summary
public Dimension getSizeEMU()

Gets the dimensions of the metafile

Returns:Dimension

the dimensions of the metafile

getUIDback to summary
public byte[] getUID()

Gets the first MD4, that specifies the unique identifier of the uncompressed blip data

Returns:byte[]

the first MD4

getUncompressedSizeback to summary
public int getUncompressedSize()

Gets the uncompressed size (in bytes)

Returns:int

the uncompressed size

inflatePictureDataback to summary
private static byte[] inflatePictureData(byte[] data)

Decompresses the provided data, returning the inflated result.

Parameters
data:byte[]

the deflated picture data.

Returns:byte[]

the inflated picture data.

isCompressedback to summary
public boolean isCompressed()

Gets the compression of the metafile

Returns:boolean

true, if the metafile is compressed

serializeback to summary
public int serialize(int offset, byte[] data, EscherSerializationListener listener)

Overrides org.apache.poi.ddf.EscherBlipRecord.serialize.

Doc from org.apache.poi.ddf.EscherRecord.serialize.

Serializes the record to an existing byte array.

Parameters
offset:int

the offset within the byte array

data:byte[]

the data array to serialize to

listener:EscherSerializationListener

a listener for begin and end serialization events. This is useful because the serialization is hierarchical/recursive and sometimes you need to be able break into that.

Returns:int

the number of bytes written.

Annotations
@Override
setBoundsback to summary
public void setBounds(Rectangle bounds)

Sets the clipping region

Parameters
bounds:Rectangle

the clipping region

setCompressedback to summary
public void setCompressed(boolean compressed)

Sets the compression of the metafile

Parameters
compressed:boolean

the compression state, true if it's compressed

setCompressedSizeback to summary
public void setCompressedSize(int compressedSize)

Sets the compressed size of the metafile (in bytes)

Parameters
compressedSize:int

the compressed size

setFilterback to summary
public void setFilter(byte filter)

Sets the filter byte - this is usually 0xFE

Parameters
filter:byte

the filter byte

setMaxRecordLengthback to summary
public static void setMaxRecordLength(int length)

Hides org.apache.poi.ddf.EscherBlipRecord.setMaxRecordLength.

Parameters
length:int

the max record length allowed for EscherMetafileBlip

setPictureDataback to summary
public void setPictureData(byte[] pictureData)

Overrides org.apache.poi.ddf.EscherBlipRecord.setPictureData.

Doc from org.apache.poi.ddf.EscherBlipRecord.setPictureData.

Sets the picture data bytes

Parameters
pictureData:byte[]

the picture data

Annotations
@Override
setPrimaryUIDback to summary
public void setPrimaryUID(byte[] primaryUID)

Sets the second MD4, that specifies the unique identifier of the uncompressed blip data

Parameters
primaryUID:byte[]

the second MD4

setSizeEMUback to summary
public void setSizeEMU(Dimension sizeEMU)

Gets the dimensions of the metafile

Parameters
sizeEMU:Dimension

the dimensions of the metafile

setUIDback to summary
public void setUID(byte[] uid)

Sets the first MD4, that specifies the unique identifier of the uncompressed blip data

Parameters
uid:byte[]

the first MD4

setUncompressedSizeback to summary
public void setUncompressedSize(int uncompressedSize)

Sets the uncompressed size (in bytes)

Parameters
uncompressedSize:int

the uncompressed size