|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.poi.hwpf.model.PropertyNode
org.apache.poi.hwpf.model.TextPiece
public class TextPiece
Lightweight representation of a text piece. Works in the character domain, not the byte domain, so you need to have turned byte references into character references before getting here.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.poi.hwpf.model.PropertyNode |
|---|
PropertyNode.EndComparator, PropertyNode.StartComparator |
| Constructor Summary | |
|---|---|
TextPiece(int start,
int end,
byte[] text,
PieceDescriptor pd)
|
|
TextPiece(int start,
int end,
byte[] text,
PieceDescriptor pd,
int cpStart)
Deprecated. Use TextPiece(int,int,byte[],PieceDescriptor)
instead |
|
| Method Summary | |
|---|---|
void |
adjustForDelete(int start,
int length)
Adjusts the internal string for deletinging some characters within this. |
int |
bytesLength()
Returns the length, in bytes |
int |
characterLength()
Returns the length, in characters |
boolean |
equals(java.lang.Object o)
|
int |
getCP()
Returns the character position we start at. |
PieceDescriptor |
getPieceDescriptor()
|
byte[] |
getRawBytes()
|
java.lang.StringBuffer |
getStringBuffer()
|
boolean |
isUnicode()
|
java.lang.String |
substring(int start,
int end)
Returns part of the string. |
java.lang.String |
toString()
|
| Methods inherited from class org.apache.poi.hwpf.model.PropertyNode |
|---|
clone, compareTo, getEnd, getStart, hashCode, setEnd, setStart |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TextPiece(int start,
int end,
byte[] text,
PieceDescriptor pd,
int cpStart)
TextPiece(int,int,byte[],PieceDescriptor)
instead
start - Beginning offset in main document stream, in characters.end - Ending offset in main document stream, in characters.text - The raw bytes of our text
public TextPiece(int start,
int end,
byte[] text,
PieceDescriptor pd)
start - Beginning offset in main document stream, in characters.end - Ending offset in main document stream, in characters.text - The raw bytes of our text| Method Detail |
|---|
public boolean isUnicode()
public PieceDescriptor getPieceDescriptor()
public java.lang.StringBuffer getStringBuffer()
public byte[] getRawBytes()
public java.lang.String substring(int start,
int end)
start - Local start position, in charactersend - Local end position, in characters
public void adjustForDelete(int start,
int length)
adjustForDelete in class PropertyNodestart - The start position for the delete, in characterslength - The number of characters to deletepublic int characterLength()
public int bytesLength()
public boolean equals(java.lang.Object o)
equals in class PropertyNodepublic int getCP()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||