Package loci.poi.ddf
Class EscherBSERecord
- java.lang.Object
-
- loci.poi.ddf.EscherRecord
-
- loci.poi.ddf.EscherBSERecord
-
public class EscherBSERecord extends EscherRecord
The BSE record is related closely to theEscherBlipRecordand stores extra information about the blip. A blip record is actually stored inside the BSE record even though the BSE record isn't actually a container record.- Author:
- Glen Stampoultzis
- See Also:
EscherBlipRecord
-
-
Field Summary
Fields Modifier and Type Field Description static byteBT_DIBstatic byteBT_EMFstatic byteBT_ERRORstatic byteBT_JPEGstatic byteBT_PICTstatic byteBT_PNGstatic byteBT_UNKNOWNstatic byteBT_WMFstatic java.lang.StringRECORD_DESCRIPTIONstatic shortRECORD_ID
-
Constructor Summary
Constructors Constructor Description EscherBSERecord()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intfillFields(byte[] data, int offset, EscherRecordFactory recordFactory)This method deserializes the record from a byte array.EscherBlipRecordgetBlipRecord()java.lang.StringgetBlipType(byte b)Retrieve the string representation given a blip id.bytegetBlipTypeMacOS()The expected blip type under MacOS (failure to match this blip type will result in Excel converting to this format).bytegetBlipTypeWin32()The expected blip type under windows (failure to match this blip type will result in Excel converting to this format).bytegetName()The length in characters of the blip name.intgetOffset()File offset in the delay stream.java.lang.StringgetRecordName()The short name for this recordintgetRecordSize()Returns the number of bytes that are required to serialize this record.intgetRef()The reference count of this blip.byte[]getRemainingData()Any remaining data in this record.intgetSize()Blip size in stream.shortgetTag()unusedbyte[]getUid()16 byte MD4 checksum.bytegetUnused2()bytegetUnused3()bytegetUsage()Defines the way this blip is used.intserialize(int offset, byte[] data, EscherSerializationListener listener)This method serializes this escher record into a byte array.voidsetBlipRecord(EscherBlipRecord field_12_blipRecord)voidsetBlipTypeMacOS(byte blipTypeMacOS)Set the expected MacOS blip typevoidsetBlipTypeWin32(byte blipTypeWin32)Set the expected win32 blip typevoidsetName(byte name)The length in characters of the blip name.voidsetOffset(int offset)File offset in the delay stream.voidsetRef(int ref)The reference count of this blip.voidsetRemainingData(byte[] remainingData)Any remaining data in this record.voidsetSize(int size)Blip size in stream.voidsetTag(short tag)unusedvoidsetUid(byte[] uid)16 byte MD4 checksum.voidsetUnused2(byte unused2)voidsetUnused3(byte unused3)voidsetUsage(byte usage)Defines the way this blip is used.java.lang.StringtoString()Calculate the string representation of this object-
Methods inherited from class loci.poi.ddf.EscherRecord
clone, display, fillFields, getChild, getChildRecords, getInstance, getOptions, getRecordId, isContainerRecord, readHeader, serialize, serialize, setChildRecords, setOptions, setRecordId
-
-
-
-
Field Detail
-
RECORD_ID
public static final short RECORD_ID
- See Also:
- Constant Field Values
-
RECORD_DESCRIPTION
public static final java.lang.String RECORD_DESCRIPTION
- See Also:
- Constant Field Values
-
BT_ERROR
public static final byte BT_ERROR
- See Also:
- Constant Field Values
-
BT_UNKNOWN
public static final byte BT_UNKNOWN
- See Also:
- Constant Field Values
-
BT_EMF
public static final byte BT_EMF
- See Also:
- Constant Field Values
-
BT_WMF
public static final byte BT_WMF
- See Also:
- Constant Field Values
-
BT_PICT
public static final byte BT_PICT
- See Also:
- Constant Field Values
-
BT_JPEG
public static final byte BT_JPEG
- See Also:
- Constant Field Values
-
BT_PNG
public static final byte BT_PNG
- See Also:
- Constant Field Values
-
BT_DIB
public static final byte BT_DIB
- See Also:
- Constant Field Values
-
-
Method Detail
-
fillFields
public int fillFields(byte[] data, int offset, EscherRecordFactory recordFactory)This method deserializes the record from a byte array.- Specified by:
fillFieldsin classEscherRecord- Parameters:
data- The byte array containing the escher record informationoffset- The starting offset intodata.recordFactory- May be null since this is not a container record.- Returns:
- The number of bytes read from the byte array.
-
serialize
public int serialize(int offset, byte[] data, EscherSerializationListener listener)This method serializes this escher record into a byte array.- Specified by:
serializein classEscherRecord- Parameters:
offset- The offset intodatato start writing the record data to.data- The byte array to serialize to.listener- A listener to retrieve start and end callbacks. Use aNullEscherSerailizationListenerto ignore these events.- Returns:
- The number of bytes written.
- See Also:
NullEscherSerializationListener
-
getRecordSize
public int getRecordSize()
Returns the number of bytes that are required to serialize this record.- Specified by:
getRecordSizein classEscherRecord- Returns:
- Number of bytes
-
getRecordName
public java.lang.String getRecordName()
The short name for this record- Specified by:
getRecordNamein classEscherRecord
-
getBlipTypeWin32
public byte getBlipTypeWin32()
The expected blip type under windows (failure to match this blip type will result in Excel converting to this format).
-
setBlipTypeWin32
public void setBlipTypeWin32(byte blipTypeWin32)
Set the expected win32 blip type
-
getBlipTypeMacOS
public byte getBlipTypeMacOS()
The expected blip type under MacOS (failure to match this blip type will result in Excel converting to this format).
-
setBlipTypeMacOS
public void setBlipTypeMacOS(byte blipTypeMacOS)
Set the expected MacOS blip type
-
getUid
public byte[] getUid()
16 byte MD4 checksum.
-
setUid
public void setUid(byte[] uid)
16 byte MD4 checksum.
-
getTag
public short getTag()
unused
-
setTag
public void setTag(short tag)
unused
-
getSize
public int getSize()
Blip size in stream.
-
setSize
public void setSize(int size)
Blip size in stream.
-
getRef
public int getRef()
The reference count of this blip.
-
setRef
public void setRef(int ref)
The reference count of this blip.
-
getOffset
public int getOffset()
File offset in the delay stream.
-
setOffset
public void setOffset(int offset)
File offset in the delay stream.
-
getUsage
public byte getUsage()
Defines the way this blip is used.
-
setUsage
public void setUsage(byte usage)
Defines the way this blip is used.
-
getName
public byte getName()
The length in characters of the blip name.
-
setName
public void setName(byte name)
The length in characters of the blip name.
-
getUnused2
public byte getUnused2()
-
setUnused2
public void setUnused2(byte unused2)
-
getUnused3
public byte getUnused3()
-
setUnused3
public void setUnused3(byte unused3)
-
getBlipRecord
public EscherBlipRecord getBlipRecord()
-
setBlipRecord
public void setBlipRecord(EscherBlipRecord field_12_blipRecord)
-
getRemainingData
public byte[] getRemainingData()
Any remaining data in this record.
-
setRemainingData
public void setRemainingData(byte[] remainingData)
Any remaining data in this record.
-
toString
public java.lang.String toString()
Calculate the string representation of this object- Overrides:
toStringin classjava.lang.Object
-
getBlipType
public java.lang.String getBlipType(byte b)
Retrieve the string representation given a blip id.
-
-