public class UnicodeString extends Object implements Comparable<UnicodeString>
Modifier and Type | Class and Description |
---|---|
static class |
UnicodeString.ExtRst |
static class |
UnicodeString.FormatRun |
static class |
UnicodeString.PhRun |
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(UnicodeString.FormatRun r)
Adds a font run to the formatted string.
|
void |
clearFormatting() |
Object |
clone() |
int |
compareTo(UnicodeString str) |
boolean |
equals(Object o)
Our handling of equals is inconsistent with compareTo.
|
Iterator<UnicodeString.FormatRun> |
formatIterator() |
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
|
UnicodeString.ExtRst |
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
|
String |
getString() |
int |
hashCode() |
void |
removeFormatRun(UnicodeString.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
|
public 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 UnicodeString.FormatRun getFormatRun(int index)
public void addFormatRun(UnicodeString.FormatRun r)
public Iterator<UnicodeString.FormatRun> formatIterator()
public void removeFormatRun(UnicodeString.FormatRun r)
public void clearFormatting()
public UnicodeString.ExtRst getExtendedRst()
public void swapFontUse(short oldFontIndex, short newFontIndex)
public String toString()
toString
in class Object
getDebugInfo()
public String getDebugInfo()
public void serialize(ContinuableRecordOutput out)
public int compareTo(UnicodeString str)
compareTo
in interface Comparable<UnicodeString>
Copyright © 2020. All rights reserved.