|
||||||||||
| 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)
* @author Andrew C. Oliver * @author Marc Johnson (mjohnson at apache dot org) * @author Glen Stampoultzis (glens at apache.org) * @version 2.0-pre
| 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 * @param id - ignored * @param size - size of the data * @param data - the bytes of the string/fields |
|
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 * * @return number of characters * |
java.lang.String |
getDebugInfo()
return a character representation of the fields of this record * * * @return String of output for biffviewer etc |
byte |
getOptionFlags()
get the option flags which among other things return if this is a 16-bit or * 8 bit string * * @return optionflags bitmask * |
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 * * * @return String * |
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 * @param cc - number of characters |
void |
setOptionFlags(byte of)
set the option flags which among other things return if this is a 16-bit or * 8 bit string * * @param of optionflags bitmask * |
void |
setString(java.lang.String string)
set the actual string this contains * @param string the text |
java.lang.String |
toString()
unlike the real records we return the same as "getString()" rather than debug info * @see #getDebugInfo() * @return String value of the record |
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)
public UnicodeString(short id,
short size,
byte[] data,
java.lang.String prefix)
| Method Detail |
public int hashCode()
public boolean equals(java.lang.Object o)
protected void validateSid(short id)
validateSid in class Recordid - alleged id for this record
protected void fillFields(byte[] data,
short size)
Record
fillFields in class Recorddata - raw datapublic short getCharCount()
public void setCharCount(short cc)
public void setCharCount()
public byte getOptionFlags()
public void setOptionFlags(byte of)
public java.lang.String getString()
public void setString(java.lang.String string)
public java.lang.String toString()
toString in class Recordpublic java.lang.String getDebugInfo()
public int serialize(int offset,
byte[] data)
Record
serialize in class Recordoffset - to begin writing atdata - byte array containing instance data
public int getRecordSize()
Record
getRecordSize in class Recordpublic short getSid()
Record
getSid in class Record
protected void fillFields(byte[] data,
short size,
int offset)
fillFields in class Recorddata - raw datasize - size of dataoffset - of the record's data (provided a big array of the file)public int compareTo(java.lang.Object obj)
compareTo in interface java.lang.Comparablepublic boolean isRichText()
public boolean isExtendedText()
|
jakarta-poi 1.10.0-dev | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||