public class UnicodeString extends Object implements Comparable<UnicodeString>, Duplicatable, GenericRecord
This is often called a XLUnicodeRichExtendedString in MS documentation.
| Constructor and Description |
|---|
UnicodeString(RecordInputStream in)
construct a unicode string record and fill its fields, ID is ignored
|
UnicodeString(String str) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFormatRun(FormatRun r)
Adds a font run to the formatted string.
|
void |
clearFormatting() |
int |
compareTo(UnicodeString str) |
UnicodeString |
copy() |
boolean |
equals(Object o)
Our handling of equals is inconsistent with compareTo.
|
Iterator<FormatRun> |
formatIterator() |
Spliterator<FormatRun> |
formatSpliterator() |
int |
getCharCount()
get the number of characters in the string,
as an un-wrapped int
|
short |
getCharCountShort()
get the number of characters in the string,
wrapped as needed to fit within a short
|
String |
getDebugInfo()
return a character representation of the fields of this record
|
ExtRst |
getExtendedRst() |
FormatRun |
getFormatRun(int index) |
int |
getFormatRunCount() |
Map<String,Supplier<?>> |
getGenericProperties() |
byte |
getOptionFlags()
get the option flags which among other things return if this is a 16-bit or
8 bit string
|
String |
getString() |
int |
hashCode() |
void |
removeFormatRun(FormatRun r) |
void |
serialize(ContinuableRecordOutput out)
Serialises out the String.
|
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(String string)
set the actual string this contains
|
void |
swapFontUse(short oldFontIndex,
short newFontIndex)
Swaps all use in the string of one font index
for use of a different font index.
|
String |
toString()
unlike the real records we return the same as "getString()" rather than debug info
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetGenericChildren, getGenericRecordTypepublic UnicodeString(String str)
public UnicodeString(RecordInputStream in)
in - the RecordInputStream to read the record frompublic boolean equals(Object o)
public int getCharCount()
public short getCharCountShort()
public void setCharCount(short cc)
cc - - number of characterspublic byte getOptionFlags()
public void setOptionFlags(byte of)
of - optionflags bitmaskpublic String getString()
public void setString(String string)
string - the textpublic int getFormatRunCount()
public FormatRun getFormatRun(int index)
public void addFormatRun(FormatRun r)
public Spliterator<FormatRun> formatSpliterator()
public void removeFormatRun(FormatRun r)
public void clearFormatting()
public ExtRst getExtendedRst()
public void swapFontUse(short oldFontIndex,
short newFontIndex)
public String toString()
toString in class ObjectgetDebugInfo()public String getDebugInfo()
public void serialize(ContinuableRecordOutput out)
public int compareTo(UnicodeString str)
compareTo in interface Comparable<UnicodeString>public UnicodeString copy()
copy in interface Duplicatablepublic Map<String,Supplier<?>> getGenericProperties()
getGenericProperties in interface GenericRecord