|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.poi.hssf.record.UnicodeString
public class 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)
Nested Class Summary | |
---|---|
static class |
UnicodeString.FormatRun
|
static class |
UnicodeString.UnicodeRecordStats
Returns the size of this record, given the ammount of record space remaining, it will also include the size of writing a continue record. |
Field Summary | |
---|---|
static short |
sid
|
Constructor Summary | |
---|---|
UnicodeString(RecordInputStream in)
construct a unicode string record and fill its fields, ID is ignored |
|
UnicodeString(java.lang.String str)
|
Method Summary | |
---|---|
void |
addFormatRun(UnicodeString.FormatRun r)
Adds a font run to the formatted string. |
void |
clearFormatting()
|
java.lang.Object |
clone()
|
int |
compareTo(java.lang.Object obj)
|
boolean |
equals(java.lang.Object o)
Our handling of equals is inconsistent with compareTo. |
protected void |
fillFields(RecordInputStream in)
|
java.util.Iterator |
formatIterator()
|
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[] |
getExtendedRst()
|
UnicodeString.FormatRun |
getFormatRun(int index)
|
int |
getFormatRunCount()
|
byte |
getOptionFlags()
get the option flags which among other things return if this is a 16-bit or 8 bit string |
void |
getRecordSize(UnicodeString.UnicodeRecordStats stats)
|
short |
getSid()
|
java.lang.String |
getString()
get the actual string this contains as a java String object |
int |
hashCode()
|
boolean |
isExtendedText()
|
boolean |
isRichText()
|
void |
removeFormatRun(UnicodeString.FormatRun r)
|
int |
serialize(UnicodeString.UnicodeRecordStats stats,
int offset,
byte[] data)
|
void |
setCharCount(short cc)
set the number of characters in the string |
void |
setCompressedUnicode()
|
void |
setExtendedRst(byte[] ext_rst)
|
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 |
void |
setUncompressedUnicode()
|
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 java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final short sid
Constructor Detail |
---|
public UnicodeString(java.lang.String str)
public UnicodeString(RecordInputStream in)
in
- the RecordInputstream to read the record fromMethod Detail |
---|
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- The object to compare.
protected void validateSid(short id)
protected void fillFields(RecordInputStream in)
in
- the RecordInputstream to read the record frompublic short getCharCount()
public void setCharCount(short cc)
cc
- - number of characterspublic byte getOptionFlags()
public void setOptionFlags(byte of)
of
- optionflags bitmaskpublic java.lang.String getString()
public void setString(java.lang.String string)
string
- the textpublic int getFormatRunCount()
public UnicodeString.FormatRun getFormatRun(int index)
public void addFormatRun(UnicodeString.FormatRun r)
public java.util.Iterator formatIterator()
public void removeFormatRun(UnicodeString.FormatRun r)
public void clearFormatting()
public byte[] getExtendedRst()
public void setExtendedRst(byte[] ext_rst)
public java.lang.String toString()
toString
in class java.lang.Object
getDebugInfo()
public java.lang.String getDebugInfo()
public int serialize(UnicodeString.UnicodeRecordStats stats, int offset, byte[] data)
public void setCompressedUnicode()
public void setUncompressedUnicode()
public void getRecordSize(UnicodeString.UnicodeRecordStats stats)
public short getSid()
public int compareTo(java.lang.Object obj)
compareTo
in interface java.lang.Comparable
public boolean isRichText()
public boolean isExtendedText()
public java.lang.Object clone()
clone
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |