|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.poi.hssf.record.Record
org.apache.poi.hssf.record.UnicodeString
Title: Unicode String
Description: Unicode String record. We implement these as a record, although they are really just standard fields that are in several records. It is considered more desirable then repeating it in all of them.
REFERENCE: PG 264 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
Field Summary | |
static short |
sid
|
Constructor Summary | |
UnicodeString()
|
|
UnicodeString(short id,
short size,
byte[] data)
construct a unicode string record and fill its fields, ID is ignored |
|
UnicodeString(short id,
short size,
byte[] data,
java.lang.String prefix)
construct a unicode string from a string fragment + data |
Method Summary | |
int |
compareTo(java.lang.Object obj)
|
boolean |
equals(java.lang.Object o)
Our handling of equals is inconsistent with compareTo. |
protected void |
fillFields(byte[] data,
short size)
called by the constructor, should set class level fields. |
protected void |
fillFields(byte[] data,
short size,
int offset)
called by the constructor, should set class level fields. |
short |
getCharCount()
get the number of characters in the string |
java.lang.String |
getDebugInfo()
return a character representation of the fields of this record |
byte |
getOptionFlags()
get the option flags which among other things return if this is a 16-bit or 8 bit string |
int |
getRecordSize()
gives the current serialized size of the record. |
short |
getSid()
return the non static version of the id for this record. |
java.lang.String |
getString()
get the actual string this contains as a java String object |
int |
hashCode()
|
boolean |
isExtendedText()
|
boolean |
isRichText()
|
int |
serialize(int offset,
byte[] data)
called by the class that is responsible for writing this sucker. |
void |
setCharCount()
sets the number of characters to whaterver number of characters is in the string currently. |
void |
setCharCount(short cc)
set the number of characters in the string |
void |
setOptionFlags(byte of)
set the option flags which among other things return if this is a 16-bit or 8 bit string |
void |
setString(java.lang.String string)
set the actual string this contains |
java.lang.String |
toString()
unlike the real records we return the same as "getString()" rather than debug info |
protected void |
validateSid(short id)
NO OP |
Methods inherited from class org.apache.poi.hssf.record.Record |
clone, isInValueSection, isValue, processContinueRecord, serialize |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final short sid
Constructor Detail |
public UnicodeString()
public UnicodeString(short id, short size, byte[] data)
id
- - ignoredsize
- - size of the datadata
- - the bytes of the string/fieldspublic UnicodeString(short id, short size, byte[] data, java.lang.String prefix)
Method Detail |
public int hashCode()
public boolean equals(java.lang.Object o)
o
- The object to compare.
protected void validateSid(short id)
validateSid
in class Record
id
- alleged id for this recordprotected void fillFields(byte[] data, short size)
Record
fillFields
in class Record
data
- raw datapublic short getCharCount()
public void setCharCount(short cc)
cc
- - number of characterspublic void setCharCount()
setString(String)
,
getString()
public byte getOptionFlags()
public void setOptionFlags(byte of)
of
- optionflags bitmaskpublic java.lang.String getString()
public void setString(java.lang.String string)
string
- the textpublic java.lang.String toString()
toString
in class Record
getDebugInfo()
public java.lang.String getDebugInfo()
public int serialize(int offset, byte[] data)
Record
serialize
in class Record
offset
- to begin writing atdata
- byte array containing instance data
public int getRecordSize()
Record
getRecordSize
in class Record
public short getSid()
Record
getSid
in class Record
protected void fillFields(byte[] data, short size, int offset)
fillFields
in class Record
data
- raw datasize
- size of dataoffset
- of the records data (provided a big array of the file)public int compareTo(java.lang.Object obj)
compareTo
in interface java.lang.Comparable
public boolean isRichText()
public boolean isExtendedText()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |