public class UnicodeString extends Object implements Comparable
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)
Modifier and Type | Class and Description |
---|---|
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.
|
Modifier and Type | Field and Description |
---|---|
static short |
sid |
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(Object obj) |
boolean |
equals(Object o)
Our handling of equals is inconsistent with compareTo.
|
protected void |
fillFields(RecordInputStream in) |
Iterator |
formatIterator() |
short |
getCharCount()
get the number of characters in the string
|
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() |
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(String string)
set the actual string this contains
|
void |
setUncompressedUnicode() |
String |
toString()
unlike the real records we return the same as "getString()" rather than debug info
|
protected void |
validateSid(short id)
NO OP
|
public static final short sid
public UnicodeString(String str)
public UnicodeString(RecordInputStream in)
in
- the RecordInputstream to read the record frompublic boolean equals(Object o)
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 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 formatIterator()
public void removeFormatRun(UnicodeString.FormatRun r)
public void clearFormatting()
public byte[] getExtendedRst()
public void setExtendedRst(byte[] ext_rst)
public String toString()
toString
in class Object
getDebugInfo()
public 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(Object obj)
compareTo
in interface Comparable
public boolean isRichText()
public boolean isExtendedText()
Copyright © 2014 Open Microscopy Environment