public class EscherBlipWMFRecord extends EscherBlipRecord
Inflater
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
RECORD_DESCRIPTION |
field_pictureData, RECORD_ID_END, RECORD_ID_START
Constructor and Description |
---|
EscherBlipWMFRecord() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
compress(byte[] data)
Compress the contents of the provided array
|
static byte[] |
decompress(byte[] data,
int pos,
int length)
Decompresses a byte array.
|
int |
fillFields(byte[] data,
int offset,
EscherRecordFactory recordFactory)
The contract of this method is to deserialize an escher record including
it's children.
|
int |
getBoundaryHeight()
Retrieve the boundary height of the metafile drawing commands
|
int |
getBoundaryLeft()
Retrieve the left boundary of the metafile drawing commands
|
int |
getBoundaryTop()
Retrieve the top boundary of the metafile drawing commands
|
int |
getBoundaryWidth()
Retrieve the boundary width of the metafile drawing commands
|
int |
getCacheOfSavedSize()
Retrieve the cache of the saved size
|
int |
getCacheOfSize()
Retrieve the cache of the metafile size
|
byte |
getCompressionFlag()
Is the contents of the blip compressed?
|
byte[] |
getData()
The BLIP data
|
byte |
getFilter()
Filter should always be 0
|
int |
getHeight()
Retrieve the height of the metafile in EMU's (English Metric Units).
|
java.lang.String |
getRecordName()
Subclasses should return the short name for this escher record.
|
int |
getRecordSize()
Subclasses should effeciently return the number of bytes required to
serialize the record.
|
byte[] |
getSecondaryUID()
Retrieve the secondary UID
|
int |
getWidth()
Retrieve the width of the metafile in EMU's (English Metric Units).
|
int |
serialize(int offset,
byte[] data,
EscherSerializationListener listener)
Serializes the record to an existing byte array.
|
void |
setBoundaryHeight(int field_6_boundaryHeight)
Set the boundary height of the metafile drawing commands
|
void |
setBoundaryLeft(int field_4_boundaryLeft)
Set the left boundary of the metafile drawing commands
|
void |
setBoundaryTop(int field_3_boundaryTop)
Set the top boundary of the metafile drawing commands
|
void |
setBoundaryWidth(int field_5_boundaryWidth)
Set the boundary width of the metafile drawing commands
|
void |
setCacheOfSavedSize(int field_9_cacheOfSavedSize)
Set the cache of the saved size
|
void |
setCacheOfSize(int field_2_cacheOfSize)
Set the cache of the metafile size
|
void |
setCompressionFlag(byte field_10_compressionFlag)
Set whether the contents of the blip is compressed
|
void |
setData(byte[] field_12_data)
The BLIP data
|
void |
setFilter(byte field_11_filter)
Filter should always be 0
|
void |
setHeight(int height)
Set the height of the metafile in EMU's (English Metric Units).
|
void |
setSecondaryUID(byte[] field_1_secondaryUID)
Set the secondary UID
|
void |
setWidth(int width)
Set the width of the metafile in EMU's (English Metric Units).
|
java.lang.String |
toString()
The string representation of this record.
|
java.lang.String |
toXml(java.lang.String tab) |
getPicturedata, setPictureData
clone, display, fillFields, formatXmlRecordHeader, getChild, getChildRecords, getInstance, getOptions, getRecordId, getVersion, isContainerRecord, readHeader, readInstance, serialize, serialize, setChildRecords, setInstance, setOptions, setRecordId, setVersion, toXml
public static final java.lang.String RECORD_DESCRIPTION
public int fillFields(byte[] data, int offset, EscherRecordFactory recordFactory)
EscherRecord
fillFields
in class EscherBlipRecord
data
- The byte array containing the serialized escher
records.offset
- The offset into the byte array.recordFactory
- A factory for creating new escher records.public int serialize(int offset, byte[] data, EscherSerializationListener listener)
EscherRecord
serialize
in class EscherBlipRecord
offset
- the offset within the byte arraydata
- the data array to serialize tolistener
- 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.public int getRecordSize()
EscherRecord
getRecordSize
in class EscherBlipRecord
public java.lang.String getRecordName()
EscherRecord
getRecordName
in class EscherBlipRecord
public byte[] getSecondaryUID()
public void setSecondaryUID(byte[] field_1_secondaryUID)
public int getCacheOfSize()
public void setCacheOfSize(int field_2_cacheOfSize)
public int getBoundaryTop()
public void setBoundaryTop(int field_3_boundaryTop)
public int getBoundaryLeft()
public void setBoundaryLeft(int field_4_boundaryLeft)
public int getBoundaryWidth()
public void setBoundaryWidth(int field_5_boundaryWidth)
public int getBoundaryHeight()
public void setBoundaryHeight(int field_6_boundaryHeight)
public int getWidth()
public void setWidth(int width)
public int getHeight()
public void setHeight(int height)
public int getCacheOfSavedSize()
public void setCacheOfSavedSize(int field_9_cacheOfSavedSize)
public byte getCompressionFlag()
public void setCompressionFlag(byte field_10_compressionFlag)
public byte getFilter()
public void setFilter(byte field_11_filter)
public byte[] getData()
public void setData(byte[] field_12_data)
public java.lang.String toString()
toString
in class EscherBlipRecord
public java.lang.String toXml(java.lang.String tab)
toXml
in class EscherBlipRecord
tab
- - each children must be a right of his parentpublic static byte[] compress(byte[] data)
data
- An uncompressed byte arrayDeflaterOutputStream.write(int b)
public static byte[] decompress(byte[] data, int pos, int length)
data
- The compressed byte arraypos
- The starting position into the byte arraylength
- The number of compressed bytes to decompressInflaterInputStream.read()
Copyright © 2005-2010 Potix Corporation. All Rights Reserved.